[U-Boot] [PATCH 1/2] Move uninitialized_var() macro from ubi_uboot.h to compiler.h
Mike Frysinger
vapier at gentoo.org
Wed Sep 2 05:13:48 CEST 2009
On Tuesday 01 September 2009 15:58:14 Anton Vorontsov wrote:
> On Tue, Sep 01, 2009 at 08:52:33PM +0200, Albin Tonnerre wrote:
> > > > > +/* compiler options */
> > > > > +#define uninitialized_var(x) x = x
> > > >
> > > > Please excuse my ignorance, but where and what for is such a
> > > > definition useful?
> > >
> > > It's used to avoid GCC warnings, i.e. when GCC isn't smart enough
> > > to see that some variable isn't actually used uninitialized.
> > >
> > > ~/linux-2.6$ git grep uninitialized_var drivers/ | wc -l
> > > 94
> >
> > You seem to be grepping the linux source tree.
>
> Yes, which is a great source of best practices.
except you didnt filter drivers/staging/ thus negating any results you might
try to use to back up arguments
-mike
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 836 bytes
Desc: This is a digitally signed message part.
Url : http://lists.denx.de/pipermail/u-boot/attachments/20090901/9a3d1142/attachment.pgp
More information about the U-Boot
mailing list