With the few remaining fixes now landed, we can re-enable the option
-Wunterminated-string-initialization (via -Wextra). Both GCC and Clang
have the required multi-dimensional nonstring attribute support.

Build tested allmodconfig with:
        gcc (Ubuntu 14.2.0-19ubuntu2) 14.2.0
        gcc (GCC) 15.1.1 20250521 (Red Hat 15.1.1-2)
        clang version 20.1.8 (Fedora 20.1.8-1.fc42)
        ClangBuiltLinux clang version 21.1.0-rc2
        clang version 22.0.0git

Signed-off-by: Kees Cook <[email protected]>
---
 v2: Clang is fixed too! :) (Nathan)
 v1: https://lore.kernel.org/lkml/[email protected]/
Cc: Masahiro Yamada <[email protected]>
Cc: Nathan Chancellor <[email protected]>
Cc: Nicolas Schier <[email protected]>
Cc: <[email protected]>
---
 scripts/Makefile.extrawarn | 3 ---
 1 file changed, 3 deletions(-)

diff --git a/scripts/Makefile.extrawarn b/scripts/Makefile.extrawarn
index dca175fffcab..a1001377dcb2 100644
--- a/scripts/Makefile.extrawarn
+++ b/scripts/Makefile.extrawarn
@@ -78,9 +78,6 @@ KBUILD_CFLAGS += $(call cc-option, -Wcast-function-type)
 KBUILD_CFLAGS-$(CONFIG_CC_NO_STRINGOP_OVERFLOW) += $(call cc-option, 
-Wno-stringop-overflow)
 KBUILD_CFLAGS-$(CONFIG_CC_STRINGOP_OVERFLOW) += $(call cc-option, 
-Wstringop-overflow)
 
-# Currently, disable -Wunterminated-string-initialization as broken
-KBUILD_CFLAGS += $(call cc-option, -Wno-unterminated-string-initialization)
-
 # The allocators already balk at large sizes, so silence the compiler
 # warnings for bounds checks involving those possible values. While
 # -Wno-alloc-size-larger-than would normally be used here, earlier versions
-- 
2.34.1


Reply via email to