ANDROID: Kbuild, LLVMLinux: disable clang -Wpointer-bool-conversion
clang warns when converting the address of an array or function to boolean, since it can never be NULL. The kernel relies on gcc silently optimizing these checks away, like when dealing with cpumask_var_t (which can be either a pointer or an array object, depending on the value of CONFIG_CPUMASK_OFFSTACK). Change-Id: I322568a6e467d7278f065503f37dd1dddd340ef4 Signed-off-by: Greg Hackmann <ghackmann@google.com> Signed-off-by: Nathan Chancellor <natechancellor@gmail.com> Signed-off-by: khusika <khusikadhamar@gmail.com>
This commit is contained in:
parent
4b575b1109
commit
7f6ad460ae
1 changed files with 1 additions and 0 deletions
1
Makefile
1
Makefile
|
|
@ -789,6 +789,7 @@ KBUILD_CPPFLAGS += $(call cc-option,-Qunused-arguments,)
|
|||
KBUILD_CFLAGS += $(call cc-disable-warning, format-invalid-specifier)
|
||||
KBUILD_CFLAGS += $(call cc-disable-warning, gnu)
|
||||
KBUILD_CFLAGS += $(call cc-disable-warning, duplicate-decl-specifier)
|
||||
KBUILD_CFLAGS += $(call cc-disable-warning, pointer-bool-conversion)
|
||||
# Quiet clang warning: comparison of unsigned expression < 0 is always false
|
||||
KBUILD_CFLAGS += $(call cc-disable-warning, tautological-compare)
|
||||
# CLANG uses a _MergedGlobals as optimization, but this breaks modpost, as the
|
||||
|
|
|
|||
Loading…
Reference in a new issue