Skip to content

Commit 1b56c90

Browse files
Makefile: Enable -Wstringop-overflow globally
It seems that we have finished addressing all the remaining issues regarding -Wstringop-overflow. So, we are now in good shape to enable this compiler option globally. Signed-off-by: Gustavo A. R. Silva <[email protected]>
1 parent 87e41e2 commit 1b56c90

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

Makefile

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -982,6 +982,8 @@ NOSTDINC_FLAGS += -nostdinc
982982
# perform bounds checking.
983983
KBUILD_CFLAGS += $(call cc-option, -fstrict-flex-arrays=3)
984984

985+
KBUILD_CFLAGS += $(call cc-option, -Wstringop-overflow)
986+
985987
# disable invalid "can't wrap" optimizations for signed / pointers
986988
KBUILD_CFLAGS += -fno-strict-overflow
987989

scripts/Makefile.extrawarn

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,6 @@ KBUILD_CFLAGS += $(call cc-option, -Wunused-const-variable)
106106
KBUILD_CFLAGS += $(call cc-option, -Wpacked-not-aligned)
107107
KBUILD_CFLAGS += $(call cc-option, -Wformat-overflow)
108108
KBUILD_CFLAGS += $(call cc-option, -Wformat-truncation)
109-
KBUILD_CFLAGS += $(call cc-option, -Wstringop-overflow)
110109
KBUILD_CFLAGS += $(call cc-option, -Wstringop-truncation)
111110

112111
KBUILD_CPPFLAGS += -Wundef
@@ -122,7 +121,6 @@ KBUILD_CFLAGS += $(call cc-disable-warning, restrict)
122121
KBUILD_CFLAGS += $(call cc-disable-warning, packed-not-aligned)
123122
KBUILD_CFLAGS += $(call cc-disable-warning, format-overflow)
124123
KBUILD_CFLAGS += $(call cc-disable-warning, format-truncation)
125-
KBUILD_CFLAGS += $(call cc-disable-warning, stringop-overflow)
126124
KBUILD_CFLAGS += $(call cc-disable-warning, stringop-truncation)
127125

128126
ifdef CONFIG_CC_IS_CLANG

0 commit comments

Comments
 (0)