From owner-svn-src-all@FreeBSD.ORG Fri Mar 8 01:45:52 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id B5421104 for ; Fri, 8 Mar 2013 01:45:52 +0000 (UTC) (envelope-from lists@eitanadler.com) Received: from mail-wg0-f51.google.com (mail-wg0-f51.google.com [74.125.82.51]) by mx1.freebsd.org (Postfix) with ESMTP id 53503FDE for ; Fri, 8 Mar 2013 01:45:51 +0000 (UTC) Received: by mail-wg0-f51.google.com with SMTP id 8so1889692wgl.6 for ; Thu, 07 Mar 2013 17:45:51 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=eitanadler.com; s=0xdeadbeef; h=x-received:mime-version:in-reply-to:references:from:date:message-id :subject:to:cc:content-type; bh=HhY+Vg9FV2a9+kG0TIfXjg2JifwJz4uNyArS21BjVrw=; b=kxB7C9hfC/ij3iPRopSVirbc46K0I6FWX4htUCK9G5TE+wD4tUH+/8po0800b7xbAE T9xbgpmaNkUvyl8nCsLe7HaEAINaxAp5IINALbg0Ebe6yo67t3QQJptByO9Lya6cbjKu utTVcTtALfINMcEf9J0f/9rmxT6Xninv9ymjM= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=x-received:mime-version:in-reply-to:references:from:date:message-id :subject:to:cc:content-type:x-gm-message-state; bh=HhY+Vg9FV2a9+kG0TIfXjg2JifwJz4uNyArS21BjVrw=; b=k8QZBzrX7XIf/qxQt4fkb2QDsFEoD6JT3oJD8KBIIEJ4TRQOsyyJ/uSEBAFe8Vn/Z8 sANd1xB3Vd7L0PuEtS/uec4VPIqINc2rTrKTe1lLT4mmKTRyh4W2f1YEnctvyQ64hp4Z N8RrtSEHzTEkPESsP4eO92AnvF5TLu3f2sOXAogzIXTzfHJzgGPZarjnfyFEhdPiD4U6 HXzHlPb2RUx/Zh77Ef25iuXsHm1Ob/GrkTeeTL9gBAlKQMtmKTkUTzkjEvjxHiN2q/RO RZ3fOt0ZLr4tiTnSEO8TrNJoTlLh0tySJnXisecg+UBoLGSogQiOFdxQIMMtiNU03IMl taUg== X-Received: by 10.194.89.169 with SMTP id bp9mr552853wjb.57.1362707150899; Thu, 07 Mar 2013 17:45:50 -0800 (PST) MIME-Version: 1.0 Received: by 10.194.179.194 with HTTP; Thu, 7 Mar 2013 17:45:20 -0800 (PST) In-Reply-To: <51391C1E.5030905@FreeBSD.org> References: <201303072216.r27MGZ1b031061@svn.freebsd.org> <513914C4.4010001@FreeBSD.org> <51391C1E.5030905@FreeBSD.org> From: Eitan Adler Date: Thu, 7 Mar 2013 20:45:20 -0500 Message-ID: Subject: Re: svn commit: r247960 - head/cddl/contrib/opensolaris/tools/ctf/cvt To: Dimitry Andric Content-Type: text/plain; charset=UTF-8 X-Gm-Message-State: ALoCoQkzReWCh9M+1Dz7U3bKaQDjCktzdyAXbC86IUoqaP9mteDVsK3GsO8T9C/d+E/6PSYx0lC0 Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, Andriy Gapon X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 08 Mar 2013 01:45:52 -0000 On 7 March 2013 18:00, Dimitry Andric wrote: > On 2013-03-07 23:29, Andriy Gapon wrote: > ... > >> I was not really kidding when I said that this change, as is, is a nop: > > ... > >>> + bname = strrchr(match.iim_name, '/'); >>> + bname = bname == NULL ? match.iim_name : bname + >>> 1; >> >> >> It would probably make sense to make use of bname after going to through >> all the >> trouble of calculating it: >> >>> match.iim_file = match.iim_name; >> >> >> Should be match.iim_file = bname ? > > > Yes, I actually had this in my test code, and committed the wrong diff > by accident. :( Fixed in r247962, in any case. > > > >> Surprised that clang hasn't warned you about this one :-) > > > Clang currently does not have the -Wunused-but-set-variable warning; it > is apparently available in the static analyzer. On the other hand, that > warning is one of the most annoying ones that newer gcc's have. :-) I have found real bugs in FreeBSD's code base as a result of this warning, but the vast majority were more annoying than useful. -- Eitan Adler