|
8 | 8 |
|
9 | 9 | # Default set of warnings, always enabled
|
10 | 10 | KBUILD_CFLAGS += -Wall
|
| 11 | +KBUILD_CFLAGS += -Wextra |
11 | 12 | KBUILD_CFLAGS += -Wundef
|
12 | 13 | KBUILD_CFLAGS += -Werror=implicit-function-declaration
|
13 | 14 | KBUILD_CFLAGS += -Werror=implicit-int
|
@@ -68,6 +69,13 @@ KBUILD_CFLAGS += -Wno-pointer-sign
|
68 | 69 | # globally built with -Wcast-function-type.
|
69 | 70 | KBUILD_CFLAGS += $(call cc-option, -Wcast-function-type)
|
70 | 71 |
|
| 72 | +# Currently, disable -Wstringop-overflow for GCC 11, globally. |
| 73 | +KBUILD_CFLAGS-$(CONFIG_CC_NO_STRINGOP_OVERFLOW) += $(call cc-disable-warning, stringop-overflow) |
| 74 | +KBUILD_CFLAGS-$(CONFIG_CC_STRINGOP_OVERFLOW) += $(call cc-option, -Wstringop-overflow) |
| 75 | + |
| 76 | +# Currently, disable -Wunterminated-string-initialization as broken |
| 77 | +KBUILD_CFLAGS += $(call cc-disable-warning, unterminated-string-initialization) |
| 78 | + |
71 | 79 | # The allocators already balk at large sizes, so silence the compiler
|
72 | 80 | # warnings for bounds checks involving those possible values. While
|
73 | 81 | # -Wno-alloc-size-larger-than would normally be used here, earlier versions
|
@@ -97,7 +105,6 @@ KBUILD_CFLAGS += $(call cc-option,-Wenum-conversion)
|
97 | 105 | # Explicitly clear padding bits during variable initialization
|
98 | 106 | KBUILD_CFLAGS += $(call cc-option,-fzero-init-padding-bits=all)
|
99 | 107 |
|
100 |
| -KBUILD_CFLAGS += -Wextra |
101 | 108 | KBUILD_CFLAGS += -Wunused
|
102 | 109 |
|
103 | 110 | #
|
|
0 commit comments