Skip to content

Commit

Permalink
Disable static array-bounds check so suppress false positives
Browse files Browse the repository at this point in the history
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 <[email protected]>
  • Loading branch information
jcjgraf authored and wipawel committed Dec 3, 2024
1 parent e1658d8 commit f2382b2
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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=@
Expand Down

0 comments on commit f2382b2

Please sign in to comment.