linux-toolchains.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] Makefile: 'Promote' -Wunused-but-set-variable to W=3
@ 2021-09-11 14:29 Peter Zijlstra
  2021-09-11 21:34 ` Segher Boessenkool
  0 siblings, 1 reply; 2+ messages in thread
From: Peter Zijlstra @ 2021-09-11 14:29 UTC (permalink / raw)
  To: masahiroy; +Cc: linux-kernel, nathan, ndesaulniers, x86, linux-toolchains


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
 

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [PATCH] Makefile: 'Promote' -Wunused-but-set-variable to W=3
  2021-09-11 14:29 [PATCH] Makefile: 'Promote' -Wunused-but-set-variable to W=3 Peter Zijlstra
@ 2021-09-11 21:34 ` Segher Boessenkool
  0 siblings, 0 replies; 2+ messages in thread
From: Segher Boessenkool @ 2021-09-11 21:34 UTC (permalink / raw)
  To: Peter Zijlstra
  Cc: masahiroy, linux-kernel, nathan, ndesaulniers, x86, linux-toolchains

On Sat, Sep 11, 2021 at 04:29:05PM +0200, Peter Zijlstra wrote:
> Upgrade -Wunused-but-set-variable to W=3 to avoid the build robots
> sending endless spam for this garbage warning.

"This warning for garbage code" you mean?

> 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.

Instead, they will not see such warnings, and make the code worse.


Segher

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2021-09-11 21:37 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-09-11 14:29 [PATCH] Makefile: 'Promote' -Wunused-but-set-variable to W=3 Peter Zijlstra
2021-09-11 21:34 ` Segher Boessenkool

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).