From owner-svn-src-head@FreeBSD.ORG Fri Apr 19 19:47:44 2013 Return-Path: Delivered-To: svn-src-head@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 3F5F4A92; Fri, 19 Apr 2013 19:47:44 +0000 (UTC) (envelope-from uqs@FreeBSD.org) Received: from acme.spoerlein.net (acme.spoerlein.net [IPv6:2a01:4f8:131:23c2::1]) by mx1.freebsd.org (Postfix) with ESMTP id CB20A1AEF; Fri, 19 Apr 2013 19:47:43 +0000 (UTC) Received: from localhost (acme.spoerlein.net [IPv6:2a01:4f8:131:23c2::1]) by acme.spoerlein.net (8.14.6/8.14.6) with ESMTP id r3JJldft041472 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Fri, 19 Apr 2013 21:47:40 +0200 (CEST) (envelope-from uqs@FreeBSD.org) Date: Fri, 19 Apr 2013 21:47:39 +0200 From: Ulrich =?utf-8?B?U3DDtnJsZWlu?= To: Eitan Adler Subject: Re: svn commit: r247960 - head/cddl/contrib/opensolaris/tools/ctf/cvt Message-ID: <20130419194739.GB11149@acme.spoerlein.net> Mail-Followup-To: Ulrich =?utf-8?B?U3DDtnJsZWlu?= , Eitan Adler , Dimitry Andric , svn-src-head@freebsd.org References: <201303072216.r27MGZ1b031061@svn.freebsd.org> <513914C4.4010001@FreeBSD.org> <51391C1E.5030905@FreeBSD.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.21 (2010-09-15) Cc: svn-src-head@freebsd.org, Dimitry Andric X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 19 Apr 2013 19:47:44 -0000 On Thu, 2013-03-07 at 20:45:20 -0500, Eitan Adler wrote: > 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. > That's why I've disabled them on http://scan.freebsd.your.org/freebsd-head/ :) Uli