From: Dave Jones <davej@redhat.com>
To: Sam Ravnborg <sam@ravnborg.org>
Cc: David Daney <ddaney@caviumnetworks.com>,
Joe Perches <joe@perches.com>,
Linus Torvalds <torvalds@linux-foundation.org>,
Linux Kernel <linux-kernel@vger.kernel.org>,
Andrew Morton <akpm@linux-foundation.org>,
BorislavPetkov <bp@alien8.de>
Subject: Re: annoying new gcc 4.6.0 warnings.
Date: Thu, 21 Apr 2011 17:28:13 -0400 [thread overview]
Message-ID: <20110421212812.GA26680@redhat.com> (raw)
In-Reply-To: <20110421205612.GA4541@merkur.ravnborg.org>
On Thu, Apr 21, 2011 at 10:56:12PM +0200, Sam Ravnborg wrote:
>
> 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.
ok, last time for reals.
Dave
--
Disable the new -Wunused-but-set-variable that was added in gcc 4.6.0
It produces more false positives than useful warnings.
This can still be enabled using W=1
Signed-off-by: Dave Jones <davej@redhat.com>
Acked-by: Sam Ravnborg <sam@ravnborg.org>
Tested-by: Sam Ravnborg <sam@ravnborg.org>
diff --git a/Makefile b/Makefile
index b967b96..08c5484 100644
--- a/Makefile
+++ b/Makefile
@@ -559,6 +559,10 @@ ifndef CONFIG_CC_STACKPROTECTOR
KBUILD_CFLAGS += $(call cc-option, -fno-stack-protector)
endif
+# 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
KBUILD_CFLAGS += -fno-omit-frame-pointer -fno-optimize-sibling-calls
else
diff --git a/scripts/Makefile.build b/scripts/Makefile.build
index d5f925a..021f7eb 100644
--- a/scripts/Makefile.build
+++ b/scripts/Makefile.build
@@ -79,6 +79,7 @@ KBUILD_EXTRA_WARNINGS += -Wpointer-arith
KBUILD_EXTRA_WARNINGS += -Wredundant-decls
KBUILD_EXTRA_WARNINGS += -Wshadow
KBUILD_EXTRA_WARNINGS += -Wswitch-default
+KBUILD_EXTRA_WARNINGS += $(call cc-option, -Wunused-but-set-variable)
KBUILD_EXTRA_WARNINGS += $(call cc-option, -Wvla,)
KBUILD_CFLAGS += $(KBUILD_EXTRA_WARNINGS)
endif
next prev parent reply other threads:[~2011-04-21 21:28 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-04-21 19:21 annoying new gcc 4.6.0 warnings Dave Jones
2011-04-21 19:24 ` Linus Torvalds
2011-04-21 19:39 ` David Daney
2011-04-21 19:44 ` Joe Perches
2011-04-21 19:58 ` Dave Jones
2011-04-21 20:08 ` Sam Ravnborg
2011-04-21 20:27 ` Dave Jones
2011-04-21 20:37 ` David Daney
2011-04-21 20:45 ` Dave Jones
2011-04-21 20:56 ` Sam Ravnborg
2011-04-21 21:28 ` Dave Jones [this message]
2011-04-21 21:42 ` Sam Ravnborg
2011-04-29 15:02 ` Michal Marek
2011-04-21 20:09 ` Linus Torvalds
2011-04-21 20:15 ` Dave Jones
2011-04-21 20:30 ` Stratos Psomadakis
2011-04-21 21:10 ` Sam Ravnborg
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20110421212812.GA26680@redhat.com \
--to=davej@redhat.com \
--cc=akpm@linux-foundation.org \
--cc=bp@alien8.de \
--cc=ddaney@caviumnetworks.com \
--cc=joe@perches.com \
--cc=linux-kernel@vger.kernel.org \
--cc=sam@ravnborg.org \
--cc=torvalds@linux-foundation.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.