]> www.infradead.org Git - users/jedix/linux-maple.git/commitdiff
Makefile: Enable -Warray-bounds
authorKees Cook <keescook@chromium.org>
Sat, 19 Jun 2021 06:30:07 +0000 (23:30 -0700)
committerKees Cook <keescook@chromium.org>
Mon, 30 Aug 2021 18:32:10 +0000 (11:32 -0700)
With the recent fixes for flexible arrays and expanded FORTIFY_SOURCE
coverage, it is now possible to enable -Warray-bounds. Since both
GCC and Clang include -Warray-bounds in -Wall, we just need to stop
disabling it.

Cc: Arnd Bergmann <arnd@arndb.de>
Cc: Masahiro Yamada <masahiroy@kernel.org>
Cc: linux-kbuild@vger.kernel.org
Co-developed-by: Gustavo A. R. Silva <gustavoars@kernel.org>
Signed-off-by: Gustavo A. R. Silva <gustavoars@kernel.org>
Signed-off-by: Kees Cook <keescook@chromium.org>
Makefile

index e4f5895badb5eb94348a2c96831a6f9d73f0def8..8e7e73a642e26b6061f8a6f68624fddc0053a9a3 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -995,7 +995,6 @@ KBUILD_CFLAGS += $(call cc-disable-warning, stringop-truncation)
 
 # We'll want to enable this eventually, but it's not going away for 5.7 at least
 KBUILD_CFLAGS += $(call cc-disable-warning, zero-length-bounds)
-KBUILD_CFLAGS += $(call cc-disable-warning, array-bounds)
 KBUILD_CFLAGS += $(call cc-disable-warning, stringop-overflow)
 
 # Another good warning that we'll want to enable eventually