summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGreg Hackmann <ghackmann@google.com>2017-03-07 10:17:18 -0800
committerDavide Garberi <dade.garberi@gmail.com>2021-10-07 16:42:15 +0200
commit7e53f00e0f9352643a71ea5e885af92982ee5fa5 (patch)
tree2df1f2ec9e01ddcb25afeebe1dabe52230d89350
parent28f7440086858cd7e8685af55b187c4b37ad581c (diff)
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>
-rw-r--r--Makefile1
1 files changed, 1 insertions, 0 deletions
diff --git a/Makefile b/Makefile
index ceed86e00f8a..ef2212b4a0f4 100644
--- a/Makefile
+++ b/Makefile
@@ -630,6 +630,7 @@ CLANG_FLAGS += -no-integrated-as
CLANG_FLAGS += -Werror=unknown-warning-option
CLANG_FLAGS += $(call cc-option, -Wno-misleading-indentation)
CLANG_FLAGS += $(call cc-option, -Wno-bool-operation)
+CLANG_FLAGS += $(call cc-option, -Wno-pointer-bool-conversion)
KBUILD_CFLAGS += $(CLANG_FLAGS)
KBUILD_AFLAGS += $(CLANG_FLAGS)
endif