mirror of
https://github.com/followmsi/android_kernel_google_msm.git
synced 2024-11-06 23:17:41 +00:00
Disable "maybe-uninitialized" warning globally
Several build configurations had already disabled this warning because it generates a lot of false positives. But some had not, and it was still enabled for "allmodconfig" builds, for example. Looking at the warnings produced, every single one I looked at was a false positive, and the warnings are frequent enough (and big enough) that they can easily hide real problems that you don't notice in the noise generated by -Wmaybe-uninitialized. The warning is good in theory, but this is a classic case of a warning that causes more problems than the warning can solve. If gcc gets better at avoiding false positives, we may be able to re-enable this warning. But as is, we're better off without it, and I want to be able to see the *real* warnings. Change-Id: Ie810d255be8911c413c9abe6965a9a66639a1dce Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
This commit is contained in:
parent
0e685881bd
commit
2599c1d9c5
2 changed files with 3 additions and 1 deletions
2
Makefile
2
Makefile
|
@ -562,6 +562,8 @@ endif # $(dot-config)
|
||||||
# Defaults to vmlinux, but the arch makefile usually adds further targets
|
# Defaults to vmlinux, but the arch makefile usually adds further targets
|
||||||
all: vmlinux
|
all: vmlinux
|
||||||
|
|
||||||
|
KBUILD_CFLAGS += $(call cc-disable-warning,maybe-uninitialized,)
|
||||||
|
|
||||||
ifdef CONFIG_CC_OPTIMIZE_FOR_SIZE
|
ifdef CONFIG_CC_OPTIMIZE_FOR_SIZE
|
||||||
KBUILD_CFLAGS += -Os $(call cc-disable-warning,maybe-uninitialized,)
|
KBUILD_CFLAGS += -Os $(call cc-disable-warning,maybe-uninitialized,)
|
||||||
else
|
else
|
||||||
|
|
|
@ -628,7 +628,7 @@ CDEFINES += -DWLAN_OPEN_SOURCE
|
||||||
endif
|
endif
|
||||||
|
|
||||||
# Fix build for GCC 4.7
|
# Fix build for GCC 4.7
|
||||||
EXTRA_CFLAGS += -Wno-maybe-uninitialized -Wno-unused-function
|
EXTRA_CFLAGS += -Wno-unused-function
|
||||||
|
|
||||||
KBUILD_CPPFLAGS += $(CDEFINES)
|
KBUILD_CPPFLAGS += $(CDEFINES)
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue