diff options
author | Masahiro Yamada <yamada.masahiro@socionext.com> | 2019-05-09 08:46:35 +0200 |
---|---|---|
committer | Masahiro Yamada <yamada.masahiro@socionext.com> | 2019-05-18 04:49:53 +0200 |
commit | 4c8dd95a723d9cccf8810be54aa62be82885c9d8 (patch) | |
tree | c16d9cc53cea5beab8fa8b11780db1edd992257e | |
parent | kbuild: add -Wvla flag unconditionally (diff) | |
download | linux-4c8dd95a723d9cccf8810be54aa62be82885c9d8.tar.xz linux-4c8dd95a723d9cccf8810be54aa62be82885c9d8.zip |
kbuild: add some extra warning flags unconditionally
These flags are documented in the GCC 4.6 manual, and recognized by
Clang as well. Let's rip off the cc-option / cc-disable-warning switches.
Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
Reviewed-by: Nathan Chancellor <natechancellor@gmail.com>
Tested-by: Nick Desaulniers <ndesaulniers@google.com>
-rw-r--r-- | scripts/Makefile.extrawarn | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/scripts/Makefile.extrawarn b/scripts/Makefile.extrawarn index 768306add591..7a12de912664 100644 --- a/scripts/Makefile.extrawarn +++ b/scripts/Makefile.extrawarn @@ -23,15 +23,16 @@ warning- := $(empty) warning-1 := -Wextra -Wunused -Wno-unused-parameter warning-1 += -Wmissing-declarations warning-1 += -Wmissing-format-attribute -warning-1 += $(call cc-option, -Wmissing-prototypes) +warning-1 += -Wmissing-prototypes warning-1 += -Wold-style-definition -warning-1 += $(call cc-option, -Wmissing-include-dirs) +warning-1 += -Wmissing-include-dirs warning-1 += $(call cc-option, -Wunused-but-set-variable) warning-1 += $(call cc-option, -Wunused-const-variable) warning-1 += $(call cc-option, -Wpacked-not-aligned) warning-1 += $(call cc-option, -Wstringop-truncation) -warning-1 += $(call cc-disable-warning, missing-field-initializers) -warning-1 += $(call cc-disable-warning, sign-compare) +# The following turn off the warnings enabled by -Wextra +warning-1 += -Wno-missing-field-initializers +warning-1 += -Wno-sign-compare warning-2 := -Waggregate-return warning-2 += -Wcast-align @@ -39,8 +40,8 @@ warning-2 += -Wdisabled-optimization warning-2 += -Wnested-externs warning-2 += -Wshadow warning-2 += $(call cc-option, -Wlogical-op) -warning-2 += $(call cc-option, -Wmissing-field-initializers) -warning-2 += $(call cc-option, -Wsign-compare) +warning-2 += -Wmissing-field-initializers +warning-2 += -Wsign-compare warning-2 += $(call cc-option, -Wmaybe-uninitialized) warning-2 += $(call cc-option, -Wunused-macros) |