summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBernhard Rosenkränzer <Bernhard.Rosenkranzer@linaro.org>2014-11-12 22:11:31 +0100
committerBernhard Rosenkränzer <Bernhard.Rosenkranzer@linaro.org>2014-11-12 22:11:31 +0100
commite406c16a52c115eca09c77a7f848432c07a50c53 (patch)
treeab3cbf67ed8b8b2e88e34927cc92690c2f2e85db
parent6fa7d957a3ffe77120f9a3852a97c32182f80ed9 (diff)
downloadbluedroid-e406c16a52c115eca09c77a7f848432c07a50c53.tar.gz
Disable some clang warnings
Disable some clang warnings that can't be fixed in the code easily. The gnu-variable-sized-type-not-at-end extension is used heavily to allow adding members to a struct after a variably sized header. constant-logical-operand is triggered by code in l2c_utils.c that looks like the construct is correct in this use case. Change-Id: I3ff8bf5b6deb7a5807dc200a50f33b2583abb9c0 Signed-off-by: Bernhard Rosenkränzer <Bernhard.Rosenkranzer@linaro.org>
-rw-r--r--bta/Android.mk1
-rw-r--r--main/Android.mk2
-rw-r--r--stack/Android.mk4
3 files changed, 7 insertions, 0 deletions
diff --git a/bta/Android.mk b/bta/Android.mk
index c863d10..cdde31b 100644
--- a/bta/Android.mk
+++ b/bta/Android.mk
@@ -7,6 +7,7 @@ LOCAL_CFLAGS += \
-DBOARD_HAVE_BLUETOOTH_BCM
endif
LOCAL_CFLAGS += -DBUILDCFG $(bdroid_CFLAGS) -std=c99
+LOCAL_CLANG_CFLAGS += -Wno-error=gnu-variable-sized-type-not-at-end
LOCAL_PRELINK_MODULE:=false
LOCAL_SRC_FILES:= \
diff --git a/main/Android.mk b/main/Android.mk
index 21dfa1c..d7c3d0a 100644
--- a/main/Android.mk
+++ b/main/Android.mk
@@ -144,4 +144,6 @@ LOCAL_REQUIRED_MODULES := \
libbt-vendor
LOCAL_MULTILIB := 32
+LOCAL_CLANG_CFLAGS := -Wno-error=gnu-variable-sized-type-not-at-end
+
include $(BUILD_SHARED_LIBRARY)
diff --git a/stack/Android.mk b/stack/Android.mk
index f1159a6..0ae47f4 100644
--- a/stack/Android.mk
+++ b/stack/Android.mk
@@ -156,5 +156,9 @@ LOCAL_MODULE_TAGS := optional
LOCAL_MODULE_CLASS := STATIC_LIBRARIES
LOCAL_SHARED_LIBRARIES := libcutils libc
LOCAL_MULTILIB := 32
+# gnu-variable-sized-type-not-at-end is needed for a variable-size header in
+# a struct.
+# const-logical-operand is needed for code in l2c_utils.c that looks intentional.
+LOCAL_CLANG_CFLAGS += -Wno-error=gnu-variable-sized-type-not-at-end -Wno-error=constant-logical-operand
include $(BUILD_STATIC_LIBRARY)