Re: annoying new gcc 4.6.0 warnings.

From: Sam Ravnborg
Date: Thu Apr 21 2011 - 16:56:18 EST


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@xxxxxxxxxxxx>
Tested-by: Sam Ravnborg <sam@xxxxxxxxxxxx>

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
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/