From owner-svn-src-head@FreeBSD.ORG Fri Sep 24 19:35:17 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id EBA201065670; Fri, 24 Sep 2010 19:35:17 +0000 (UTC) (envelope-from mckusick@mckusick.com) Received: from chez.mckusick.com (chez.mckusick.com [64.81.247.49]) by mx1.freebsd.org (Postfix) with ESMTP id A7B098FC0C; Fri, 24 Sep 2010 19:35:17 +0000 (UTC) Received: from chez.mckusick.com (localhost [127.0.0.1]) by chez.mckusick.com (8.14.3/8.14.3) with ESMTP id o8OJKPXk023192; Fri, 24 Sep 2010 12:20:25 -0700 (PDT) (envelope-from mckusick@chez.mckusick.com) Message-Id: <201009241920.o8OJKPXk023192@chez.mckusick.com> To: Doug Barton In-reply-to: <4C92DC2E.2020602@FreeBSD.org> Date: Fri, 24 Sep 2010 12:20:25 -0700 From: Kirk McKusick Cc: "Carlos A. M. dos Santos" , svn-src-head@freebsd.org, Brian Somers Subject: Re: svn commit: r212617 - head/sys/ufs/ffs X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 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, 24 Sep 2010 19:35:18 -0000 > Date: Thu, 16 Sep 2010 20:10:38 -0700 > From: Doug Barton > To: "Carlos A. M. dos Santos" > CC: Brian Somers , Kirk McKusick , > svn-src-head@FreeBSD.org, svn-src-all@FreeBSD.org, > src-committers@FreeBSD.org > Subject: Re: svn commit: r212617 - head/sys/ufs/ffs > > On 9/16/2010 7:29 PM, Carlos A. M. dos Santos wrote: > > On Thu, Sep 16, 2010 at 5:44 AM, Brian Somers wrote: > >> If INVARIANTS is not defined, the above i++ will not happen. > > > > Which does not cause any harm, since "i" is a local variable, not used > > anywhere else in the function. A picky compiler would complain, > > however, that the variable is never read. > > If 'i' is only ever used in the INVARIANTS case then it should be > appropriately wrapped everywhere it appears. While the _current_ > situation may be harmless, in the future lack of an appropriate > indication of its use may cause a problem. This isn't just a pedantic > concern, we had a case like this that broke the build just recently. > > > Doug > > -- > > ... and that's just a little bit of history repeating. > -- Propellerheads > > Improve the effectiveness of your Internet presence with > a domain name makeover! http://SupersetSolutions.com/ What is the appropriate ifdef for a variable used only inside a KASSERT? Kirk McKusick