From mboxrd@z Thu Jan 1 00:00:00 1970 From: Anton Vorontsov Date: Tue, 1 Sep 2009 23:58:14 +0400 Subject: [U-Boot] [PATCH 1/2] Move uninitialized_var() macro from ubi_uboot.h to compiler.h In-Reply-To: <20090901185232.GC3650@pc-ras4041.res.insa> References: <20090901165803.GA3668@oksana.dev.rtsoft.ru> <20090901181141.2D46F834A950@gemini.denx.de> <20090901182518.GA17903@oksana.dev.rtsoft.ru> <20090901185232.GC3650@pc-ras4041.res.insa> Message-ID: <20090901195814.GA31988@oksana.dev.rtsoft.ru> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de 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. Thanks, -- Anton Vorontsov email: cbouatmailru at gmail.com irc://irc.freenode.net/bd2