[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20070716180908.e15325bd.akpm@linux-foundation.org>
Date: Mon, 16 Jul 2007 18:09:08 -0700
From: Andrew Morton <akpm@...ux-foundation.org>
To: Jeff Garzik <jeff@...zik.org>
Cc: FUJITA Tomonori <fujita.tomonori@....ntt.co.jp>,
Jens Axboe <jens.axboe@...cle.com>,
linux-kernel@...r.kernel.org, linux-scsi@...r.kernel.org
Subject: Re: block/bsg.c
On Mon, 16 Jul 2007 20:58:11 -0400 Jeff Garzik <jeff@...zik.org> wrote:
> Andrew Morton wrote:
> > On Mon, 16 Jul 2007 20:47:45 -0400 Jeff Garzik <jeff@...zik.org> wrote:
> >
> >> Andrew Morton wrote:
> >>> The modern way of shutting up gcc is uninitialized_var().
> >>
> >> Should I convert my misc-2.6.git#gccbug repository over to this, and
> >> push upstream?
> >
> > Opinions differ (a bit) but personally I think the benefit of fixing the
> > warnings outweighs the risk that these suppressions will later hide a real
> > bug.
>
> Tooting my own horn, but, anything in #gccbug I consider to be verified
> to -not- be hiding a real bug. Human-verified not machine-verified, of
> course, so it's imperfect. But at least it's been reviewed and
> considered carefully.
Yup, but the concern (from Al, iirc) was that someone could change the code
later on, add a new bug and have that bug hidden by the unneeded
initialisation.
> I'll look into "tarting up" #gccbug for upstream... I had missed the
> introduction of uninitialized_var(), which was the genesis for this line
> of questioning.
uninitialized_var() has the advantage that it generates no code, whereas "=
0" often adds instructions. Plus of course it is self-documenting, greppable-for
and centrally alterable.
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists