From 256cb247007f9e4106094e8661c3f40192391a69 Mon Sep 17 00:00:00 2001 From: Jean-Claude Graf Date: Tue, 3 Dec 2024 09:32:48 +0100 Subject: [PATCH] Disable static array-bounds check so suppress false positives Newer versions of GCC warn about memory accesses at non-zero offsets from null pointers. As we use this intentionally at different places in our code, these warnings result in many false positives. Temporarily, disabling the flag using pragmas is not viable as it is caused by macros that provide an expression. So we could not just fix the macro, but wherever it is used. Tracked by: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99578 Signed-off-by: Jean-Claude Graf --- Makefile | 3 +++ 1 file changed, 3 insertions(+) diff --git a/Makefile b/Makefile index 1a807a0f..f6600dc5 100644 --- a/Makefile +++ b/Makefile @@ -135,6 +135,9 @@ CFLAGS += -fno-stack-protector -fno-exceptions -fno-builtin -fomit-frame-pointe CFLAGS += -mcmodel=kernel -fno-pic -fno-asynchronous-unwind-tables -fno-unwind-tables CFLAGS += -Wno-unused-parameter -Wno-address-of-packed-member CFLAGS += -Werror +# Newer versions of GCC warn about memory accesses at non-zero offsets from null pointers. +# As we use this intentionally at different places in our code, these warnings result in many false positives. +CFLAGS += -Wno-array-bounds ifneq ($(V), 1) VERBOSE=@