Skip to contentSkip to conversation

Makefile.extrawarn: remove -Wnested-externs warning

PATCH In review Arnd Bergmann 2 participants 2 messages Nov 24, 2020 – Nov 25, 2020 Kbuild

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Makefile.extrawarn: remove -Wnested-externs warning

From: Arnd Bergmann <[email protected]>

The -Wnested-externs warning has become useless with gcc, since this warns every time that BUILD_BUG_ON() or similar macros are used.

With clang, the warning option does nothing to start with, so just remove it entirely.

---
 scripts/Makefile.extrawarn | 1 -
 1 file changed, 1 deletion(-)
scripts/Makefile.extrawarn +0 -1
index 6baee1200615..d53825503874 100644
@@ -61,7 +61,6 @@ endif
 ifneq ($(findstring 2, $(KBUILD_EXTRA_WARN)),)
 
 KBUILD_CFLAGS += -Wdisabled-optimization
-KBUILD_CFLAGS += -Wnested-externs
 KBUILD_CFLAGS += -Wshadow
 KBUILD_CFLAGS += $(call cc-option, -Wlogical-op)
 KBUILD_CFLAGS += -Wmissing-field-initializers
Signature · 1 line
2.27.0
#1 lore raw
Quoted 7 lines · Arnd Bergmann

From: Arnd Bergmann <[email protected]>

The -Wnested-externs warning has become useless with gcc, since this warns every time that BUILD_BUG_ON() or similar macros are used.

Quoted 6 lines

With clang, the warning option does nothing to start with, so just remove it entirely.

---

Applied to linux-kbuild.
Thanks.

Quoted 18 lines
 scripts/Makefile.extrawarn | 1 -
 1 file changed, 1 deletion(-)
scripts/Makefile.extrawarn +0 -2
index 6baee1200615..d53825503874 100644
@@ -61,7 +61,6 @@ endif
 ifneq ($(findstring 2, $(KBUILD_EXTRA_WARN)),)
 
 KBUILD_CFLAGS += -Wdisabled-optimization
-KBUILD_CFLAGS += -Wnested-externs
 KBUILD_CFLAGS += -Wshadow
 KBUILD_CFLAGS += $(call cc-option, -Wlogical-op)
 KBUILD_CFLAGS += -Wmissing-field-initializers
--

2.27.0

Signature · 2 lines
Best Regards
Masahiro Yamada