From: Kees Cook Date: Sat, 19 Jun 2021 06:30:07 +0000 (-0700) Subject: Makefile: Enable -Warray-bounds X-Git-Url: https://www.infradead.org/git/?a=commitdiff_plain;h=dbb4411e1b14944648eacbfb8ea3eb4586bd7b1e;p=users%2Fjedix%2Flinux-maple.git Makefile: Enable -Warray-bounds 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 Cc: Masahiro Yamada Cc: linux-kbuild@vger.kernel.org Co-developed-by: Gustavo A. R. Silva Signed-off-by: Gustavo A. R. Silva Signed-off-by: Kees Cook --- diff --git a/Makefile b/Makefile index e4f5895badb5e..8e7e73a642e26 100644 --- 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