linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Peter Zijlstra <peterz@infradead.org>
To: masahiroy@kernel.org
Cc: linux-kernel@vger.kernel.org, nathan@kernel.org,
	ndesaulniers@google.com, x86@kernel.org,
	linux-toolchains@vger.kernel.org
Subject: [PATCH] Makefile: 'Promote' -Wunused-but-set-variable to W=3
Date: Sat, 11 Sep 2021 16:29:05 +0200	[thread overview]
Message-ID: <20210911142905.GZ4323@worktop.programming.kicks-ass.net> (raw)


Upgrade -Wunused-but-set-variable to W=3 to avoid the build robots
sending endless spam for this garbage warning.

By promoting it to W=3 the robots will no longer report it and people
will no longer attempt to fix them by making the code worse.

Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
---
diff --git a/scripts/Makefile.extrawarn b/scripts/Makefile.extrawarn
index d53825503874..6686cc587d3b 100644
--- a/scripts/Makefile.extrawarn
+++ b/scripts/Makefile.extrawarn
@@ -28,7 +28,6 @@ KBUILD_CFLAGS += -Wmissing-format-attribute
 KBUILD_CFLAGS += -Wmissing-prototypes
 KBUILD_CFLAGS += -Wold-style-definition
 KBUILD_CFLAGS += -Wmissing-include-dirs
-KBUILD_CFLAGS += $(call cc-option, -Wunused-but-set-variable)
 KBUILD_CFLAGS += $(call cc-option, -Wunused-const-variable)
 KBUILD_CFLAGS += $(call cc-option, -Wpacked-not-aligned)
 KBUILD_CFLAGS += $(call cc-option, -Wstringop-truncation)
@@ -88,6 +87,7 @@ KBUILD_CFLAGS += -Wredundant-decls
 KBUILD_CFLAGS += -Wsign-compare
 KBUILD_CFLAGS += -Wswitch-default
 KBUILD_CFLAGS += $(call cc-option, -Wpacked-bitfield-compat)
+KBUILD_CFLAGS += $(call cc-option, -Wunused-but-set-variable)
 
 KBUILD_CPPFLAGS += -DKBUILD_EXTRA_WARN3
 

             reply	other threads:[~2021-09-11 14:29 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-09-11 14:29 Peter Zijlstra [this message]
2021-09-11 21:34 ` [PATCH] Makefile: 'Promote' -Wunused-but-set-variable to W=3 Segher Boessenkool

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=20210911142905.GZ4323@worktop.programming.kicks-ass.net \
    --to=peterz@infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-toolchains@vger.kernel.org \
    --cc=masahiroy@kernel.org \
    --cc=nathan@kernel.org \
    --cc=ndesaulniers@google.com \
    --cc=x86@kernel.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).