diff mbox series

Makefile.extrawarn: remove -Wnested-externs warning

Message ID 20201124154339.173752-1-arnd@kernel.org (mailing list archive)
State New, archived
Headers show
Series Makefile.extrawarn: remove -Wnested-externs warning | expand

Commit Message

Arnd Bergmann Nov. 24, 2020, 3:43 p.m. UTC
From: Arnd Bergmann <arnd@arndb.de>

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.

Suggested-by: Nathan Chancellor <natechancellor@gmail.com>
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
 scripts/Makefile.extrawarn | 1 -
 1 file changed, 1 deletion(-)

Comments

Masahiro Yamada Nov. 25, 2020, 4:20 a.m. UTC | #1
On Wed, Nov 25, 2020 at 12:43 AM Arnd Bergmann <arnd@kernel.org> wrote:
>
> From: Arnd Bergmann <arnd@arndb.de>
>
> 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.
>
> Suggested-by: Nathan Chancellor <natechancellor@gmail.com>
> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
> ---

Applied to linux-kbuild.
Thanks.


>  scripts/Makefile.extrawarn | 1 -
>  1 file changed, 1 deletion(-)
>
> diff --git a/scripts/Makefile.extrawarn b/scripts/Makefile.extrawarn
> index 6baee1200615..d53825503874 100644
> --- a/scripts/Makefile.extrawarn
> +++ b/scripts/Makefile.extrawarn
> @@ -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
>
diff mbox series

Patch

diff --git a/scripts/Makefile.extrawarn b/scripts/Makefile.extrawarn
index 6baee1200615..d53825503874 100644
--- a/scripts/Makefile.extrawarn
+++ b/scripts/Makefile.extrawarn
@@ -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