gcc-10: disable 'stringop-overflow' warning for now 76/292976/1
authorLinus Torvalds <torvalds@linux-foundation.org>
Sat, 9 May 2020 22:40:52 +0000 (15:40 -0700)
committerSeung-Woo Kim <sw0312.kim@samsung.com>
Wed, 17 May 2023 11:04:01 +0000 (20:04 +0900)
commit 5a76021c2eff7fcf2f0918a08fd8a37ce7922921 upstream.

This is the final array bounds warning removal for gcc-10 for now.

Again, the warning is good, and we should re-enable all these warnings
when we have converted all the legacy array declaration cases to
flexible arrays. But in the meantime, it's just noise.

Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
[sw0312.kim: cherry-pick stable linux-4.9.y commit 01d51bb31251 to resolve gcc-12 build issue]
Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com>
Change-Id: Ib77eddcecffb54441f73d4324ad6abe7c7e2c4f5

Makefile

index f880326f3c6dcebac1dafd23c5aa5fdc6101e713..81acf3466021d98a7acd9bce20bff9c39e29fde7 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -798,6 +798,7 @@ 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)
 
 # disable invalid "can't wrap" optimizations for signed / pointers
 KBUILD_CFLAGS  += $(call cc-option,-fno-strict-overflow)