diff options
author | Masahiro Yamada <yamada.masahiro@socionext.com> | 2019-05-09 02:46:35 -0400 |
---|---|---|
committer | Masahiro Yamada <yamada.masahiro@socionext.com> | 2019-05-17 22:49:53 -0400 |
commit | 4c8dd95a723d9cccf8810be54aa62be82885c9d8 (patch) | |
tree | c16d9cc53cea5beab8fa8b11780db1edd992257e /scripts | |
parent | 8289f913fe12644a9358c12df3da5bd4e7767df0 (diff) |
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>
Diffstat (limited to 'scripts')
-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) | |||
23 | warning-1 := -Wextra -Wunused -Wno-unused-parameter | 23 | warning-1 := -Wextra -Wunused -Wno-unused-parameter |
24 | warning-1 += -Wmissing-declarations | 24 | warning-1 += -Wmissing-declarations |
25 | warning-1 += -Wmissing-format-attribute | 25 | warning-1 += -Wmissing-format-attribute |
26 | warning-1 += $(call cc-option, -Wmissing-prototypes) | 26 | warning-1 += -Wmissing-prototypes |
27 | warning-1 += -Wold-style-definition | 27 | warning-1 += -Wold-style-definition |
28 | warning-1 += $(call cc-option, -Wmissing-include-dirs) | 28 | warning-1 += -Wmissing-include-dirs |
29 | warning-1 += $(call cc-option, -Wunused-but-set-variable) | 29 | warning-1 += $(call cc-option, -Wunused-but-set-variable) |
30 | warning-1 += $(call cc-option, -Wunused-const-variable) | 30 | warning-1 += $(call cc-option, -Wunused-const-variable) |
31 | warning-1 += $(call cc-option, -Wpacked-not-aligned) | 31 | warning-1 += $(call cc-option, -Wpacked-not-aligned) |
32 | warning-1 += $(call cc-option, -Wstringop-truncation) | 32 | warning-1 += $(call cc-option, -Wstringop-truncation) |
33 | warning-1 += $(call cc-disable-warning, missing-field-initializers) | 33 | # The following turn off the warnings enabled by -Wextra |
34 | warning-1 += $(call cc-disable-warning, sign-compare) | 34 | warning-1 += -Wno-missing-field-initializers |
35 | warning-1 += -Wno-sign-compare | ||
35 | 36 | ||
36 | warning-2 := -Waggregate-return | 37 | warning-2 := -Waggregate-return |
37 | warning-2 += -Wcast-align | 38 | warning-2 += -Wcast-align |
@@ -39,8 +40,8 @@ warning-2 += -Wdisabled-optimization | |||
39 | warning-2 += -Wnested-externs | 40 | warning-2 += -Wnested-externs |
40 | warning-2 += -Wshadow | 41 | warning-2 += -Wshadow |
41 | warning-2 += $(call cc-option, -Wlogical-op) | 42 | warning-2 += $(call cc-option, -Wlogical-op) |
42 | warning-2 += $(call cc-option, -Wmissing-field-initializers) | 43 | warning-2 += -Wmissing-field-initializers |
43 | warning-2 += $(call cc-option, -Wsign-compare) | 44 | warning-2 += -Wsign-compare |
44 | warning-2 += $(call cc-option, -Wmaybe-uninitialized) | 45 | warning-2 += $(call cc-option, -Wmaybe-uninitialized) |
45 | warning-2 += $(call cc-option, -Wunused-macros) | 46 | warning-2 += $(call cc-option, -Wunused-macros) |
46 | 47 | ||