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

next in thread | previous in thread | raw e-mail | index | archive | help
--Sig_/Iiks/N/my8MI5m6+Ti3WsdW
Content-Type: text/plain; charset=US-ASCII
Content-Transfer-Encoding: quoted-printable

On Fri, 24 Sep 2010 12:20:25 -0700 Kirk McKusick <mckusick@mckusick.com> wr=
ote:
> > 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.o=
rg>,
> >         svn-src-head@FreeBSD.org, svn-src-all@FreeBSD.org,
> >         src-committers@FreeBSD.org
> > Subject: Re: svn commit: r212617 - head/sys/ufs/ffs
> >=20
> > 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>  wro=
te:
> > >> 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.
> >=20
> > If 'i' is only ever used in the INVARIANTS case then it should be=20
> > appropriately wrapped everywhere it appears. While the _current_=20
> > situation may be harmless, in the future lack of an appropriate=20
> > indication of its use may cause a problem. This isn't just a pedantic=20
> > concern, we had a case like this that broke the build just recently.
> >=20
> >=20
> > Doug
> >=20
> > --=20
> >=20
> > 	... and that's just a little bit of history repeating.
> > 			-- Propellerheads
> >=20
> > 	Improve the effectiveness of your Internet presence with
> > 	a domain name makeover!    http://SupersetSolutions.com/
>=20
> What is the appropriate ifdef for a variable used only inside a KASSERT?
>=20
> 	Kirk McKusick

I'd guess '#ifdef INVARIANTS' (from looking at systm.h).

--=20
Brian Somers                                          <brian@Awfulhak.org>
Don't _EVER_ lose your sense of humour !               <brian@FreeBSD.org>

--Sig_/Iiks/N/my8MI5m6+Ti3WsdW
Content-Type: application/pgp-signature; name=signature.asc
Content-Disposition: attachment; filename=signature.asc

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.16 (FreeBSD)

iQCVAwUBTJ2ktQ7tvOdmanQhAQK0PQP8DSZ9fpAPtgGg5SSIDZHZXrnXecCosz2v
IeqT/p0YlO2XzMO8Vw5ClxMxXg4s0w3DjQSGAm9EFMN9f+79uQavVsLWloHJ6sIV
0IkR35NViUBcbZ/4gPx0mbzk+sDRUqIikEDwUyQu08rb06DYqwiVwS8b4TwjeJdx
kgFMU8TEQOA=
=utIt
-----END PGP SIGNATURE-----

--Sig_/Iiks/N/my8MI5m6+Ti3WsdW--



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