Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 24 Sep 2010 12:20:25 -0700
From:      Kirk McKusick <mckusick@mckusick.com>
To:        Doug Barton <dougb@freebsd.org>
Cc:        "Carlos A. M. dos Santos" <unixmania@gmail.com>, svn-src-head@freebsd.org, Brian Somers <brian@freebsd.org>
Subject:   Re: svn commit: r212617 - head/sys/ufs/ffs 
Message-ID:  <201009241920.o8OJKPXk023192@chez.mckusick.com>
In-Reply-To: <4C92DC2E.2020602@FreeBSD.org> 

next in thread | previous in thread | raw e-mail | index | archive | help
> Date: Thu, 16 Sep 2010 20:10:38 -0700
> From: Doug Barton <dougb@FreeBSD.org>
> To: "Carlos A. M. dos Santos" <unixmania@gmail.com>
> CC: Brian Somers <brian@FreeBSD.org>, Kirk McKusick <mckusick@FreeBSD.org>,
>         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<brian@freebsd.org>  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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201009241920.o8OJKPXk023192>