svn commit: r212617 - head/sys/ufs/ffs
Brian Somers
brian at FreeBSD.org
Sat Sep 25 07:44:01 UTC 2010
On Fri, 24 Sep 2010 12:20:25 -0700 Kirk McKusick <mckusick at mckusick.com> wrote:
> > Date: Thu, 16 Sep 2010 20:10:38 -0700
> > From: Doug Barton <dougb at FreeBSD.org>
> > To: "Carlos A. M. dos Santos" <unixmania at gmail.com>
> > CC: Brian Somers <brian at FreeBSD.org>, Kirk McKusick <mckusick at FreeBSD.org>,
> > svn-src-head at FreeBSD.org, svn-src-all at FreeBSD.org,
> > src-committers at 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 at 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
I'd guess '#ifdef INVARIANTS' (from looking at systm.h).
--
Brian Somers <brian at Awfulhak.org>
Don't _EVER_ lose your sense of humour ! <brian at FreeBSD.org>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 306 bytes
Desc: not available
Url : http://lists.freebsd.org/pipermail/svn-src-head/attachments/20100925/0ac76f17/signature.pgp
More information about the svn-src-head
mailing list