Skip to content

Commit 113a618

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 6613476 commit 113a618

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
@@ -986,6 +986,8 @@ NOSTDINC_FLAGS += -nostdinc
986986
# perform bounds checking.
987987
KBUILD_CFLAGS += $(call cc-option, -fstrict-flex-arrays=3)
988988

989+
KBUILD_CFLAGS += $(call cc-option, -Wstringop-overflow)
990+
989991
# disable invalid "can't wrap" optimizations for signed / pointers
990992
KBUILD_CFLAGS += -fno-strict-overflow
991993

scripts/Makefile.extrawarn

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,6 @@ KBUILD_CFLAGS += $(call cc-option, -Wunused-const-variable)
9797
KBUILD_CFLAGS += $(call cc-option, -Wpacked-not-aligned)
9898
KBUILD_CFLAGS += $(call cc-option, -Wformat-overflow)
9999
KBUILD_CFLAGS += $(call cc-option, -Wformat-truncation)
100-
KBUILD_CFLAGS += $(call cc-option, -Wstringop-overflow)
101100
KBUILD_CFLAGS += $(call cc-option, -Wstringop-truncation)
102101

103102
KBUILD_CPPFLAGS += -Wundef
@@ -113,7 +112,6 @@ KBUILD_CFLAGS += $(call cc-disable-warning, restrict)
113112
KBUILD_CFLAGS += $(call cc-disable-warning, packed-not-aligned)
114113
KBUILD_CFLAGS += $(call cc-disable-warning, format-overflow)
115114
KBUILD_CFLAGS += $(call cc-disable-warning, format-truncation)
116-
KBUILD_CFLAGS += $(call cc-disable-warning, stringop-overflow)
117115
KBUILD_CFLAGS += $(call cc-disable-warning, stringop-truncation)
118116

119117
ifdef CONFIG_CC_IS_CLANG

0 commit comments

Comments
 (0)