Re: annoying new gcc 4.6.0 warnings.

Sam Ravnborg
2011-04-21T20:56:16Z

On Thu, Apr 21, 2011 at 04:45:49PM -0400, Dave Jones wrote:
> On Thu, Apr 21, 2011 at 01:37:36PM -0700, David Daney wrote:
> > > +KBUILD_EXTRA_WARNINGS += -Wunused-but-set-variable
> >
> > Well I didn't test it, but presumably if you need the $(call cc-option,
> > -Wno-unused-but-set-variable), you would need similar here.
>
> Third time's the charm ?

Seems soo. It semi works now.
"make W=1" is broken for reasons that is not related to this patch - will submit
a fix in a minute for that.

So you can add:
Acked-by: Sam Ravnborg <sam@ravnborg.org>
Tested-by: Sam Ravnborg <sam@ravnborg.org>

on the patch.

And if you really want to make me happy then you add a comment about _why_
we disable the warning.

Something like:

# This warning generated too much noise in a regular build.
# Use make W=1 to enable this warning (see scripts/Makefile.build)
+KBUILD_CFLAGS += $(call cc-option, -Wno-unused-but-set-variable)
+
ifdef CONFIG_FRAME_POINTER

Sam