From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jean Delvare Subject: Re: [PATCH] i2c: Build core and algo drivers with -Wshadow Date: Wed, 17 Feb 2010 14:44:16 +0100 Message-ID: <20100217144416.0aaaee76@hyperion.delvare> References: <20100216122152.29dbbeb5@hyperion.delvare> <20100216202715.GC17428@pengutronix.de> <20100216225352.1c4c3893@hyperion.delvare> Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <20100216225352.1c4c3893-ig7AzVSIIG7kN2dkZ6Wm7A@public.gmane.org> Sender: linux-i2c-owner-u79uwXL29TY76Z2rM5mHXA@public.gmane.org To: Wolfram Sang Cc: Linux I2C , Jonathan Cameron List-Id: linux-i2c@vger.kernel.org On Tue, 16 Feb 2010 22:53:52 +0100, Jean Delvare wrote: > On Tue, 16 Feb 2010 21:27:15 +0100, Wolfram Sang wrote: > > On Tue, Feb 16, 2010 at 12:21:52PM +0100, Jean Delvare wrote: > > > I like building with -Wshadow, it helps catch bugs or at least bad > > > choices in variable names. > > > > > > Signed-off-by: Jean Delvare > > > Cc: Jonathan Cameron > > > Cc: Wolfram Sang > > > --- > > > Any objection? > > > > [After some searching] > > > > Do you know if -Wshadow has improved since this thread? > > > > http://kerneltrap.org/node/7434 > > Probably not. This is the reason why I enabled -Wshadow only in 2 > selected subdirectories where I think it makes sense (low driver count) > rather than the whole kernel (or even the whole i2c subsystem.) > > The fact that it spotted one (admittedly harmless) bug, and would have > caught my confusing code in i2c-smbus too, make me confident that this > is not too bad an idea. Oh well, -Wshadow is triggering warnings in header files on some architectures, so this wasn't really an option. I've discarded the patch now. -- Jean Delvare