]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
Don't start ad-hoc games with -Wno-maybe-initialized
authorTom Rini <trini@konsulko.com>
Thu, 14 May 2020 12:30:02 +0000 (08:30 -0400)
committerTom Rini <trini@konsulko.com>
Wed, 1 Jul 2020 14:11:03 +0000 (10:11 -0400)
Borrowing from Linux commit 78a5255ffb6a ("Stop the ad-hoc games with -Wno-maybe-initialized")
move to have maybe-initialized warnings be handled with building with
W=2 instead of playing more guessing games with newer compilers.

Signed-off-by: Tom Rini <trini@konsulko.com>
Makefile

index 0226930a07f01fb637d1c84cb98e4acedf15f52e..9033509b9b7d8848269b197f7a5497943ed7fdf8 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -683,6 +683,9 @@ KBUILD_CFLAGS += $(call cc-option,-fno-delete-null-pointer-checks)
 # disable stringop warnings in gcc 8+
 KBUILD_CFLAGS += $(call cc-disable-warning, stringop-truncation)
 
+# Enabled with W=2, disabled by default as noisy
+KBUILD_CFLAGS += $(call cc-disable-warning, maybe-uninitialized)
+
 # change __FILE__ to the relative path from the srctree
 KBUILD_CFLAGS  += $(call cc-option,-fmacro-prefix-map=$(srctree)/=)