aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChih-Hung Hsieh <chh@google.com>2017-10-13 14:59:17 -0700
committerChih-Hung Hsieh <chh@google.com>2017-10-13 14:59:17 -0700
commit62eda2805c1b4175dc02aa588a9e81cbd22611ee (patch)
treec2f442b2393c806d49012ebc344ede2275f3ebb2
parent8c0f110a8a4ff7b0ba25dd52a79105ed2712c59b (diff)
downloadbison-62eda2805c1b4175dc02aa588a9e81cbd22611ee.tar.gz
Use -Werror in external/bison
* Suppress existing warnings, to catch new warnings. * No -Werror for darwin host yet. Need to fix/suppress more warnings. Bug: 66996870 Test: build with WITH_TIDY=1 Change-Id: I3e70fae74dc0ac99ab54e021d31d6af2de675434
-rw-r--r--Android.mk18
1 files changed, 18 insertions, 0 deletions
diff --git a/Android.mk b/Android.mk
index 59fa45f0..cb8753b4 100644
--- a/Android.mk
+++ b/Android.mk
@@ -14,6 +14,13 @@
LOCAL_PATH:= $(call my-dir)
+ifeq ($(HOST_OS),darwin)
+# No -Werror for darwin yet. Need to fix/suppress more warnings.
+BISON_WERROR :=
+else
+BISON_WERROR := -Werror
+endif
+
###########################################
include $(CLEAR_VARS)
@@ -132,6 +139,8 @@ LOCAL_SRC_FILES += \
lib/fcntl.c
endif
+LOCAL_CFLAGS := $(BISON_WERROR) -Wall -Wno-sign-compare
+
include $(BUILD_HOST_STATIC_LIBRARY)
###########################################
@@ -145,6 +154,13 @@ LOCAL_C_INCLUDES := \
LOCAL_CFLAGS := -DPKGDATADIR=\"$(LOCAL_PATH)/data\"
+LOCAL_CFLAGS := -DPKGDATADIR=\"$(LOCAL_PATH)/data\" \
+ -Wall \
+ $(BISON_WERROR) \
+ -Wno-sign-compare \
+ -Wno-sometimes-uninitialized \
+ -Wno-unused-parameter \
+
LOCAL_STATIC_LIBRARIES := libbison
LOCAL_SRC_FILES := \
@@ -186,3 +202,5 @@ LOCAL_SRC_FILES := \
src/uniqstr.c
include $(BUILD_HOST_EXECUTABLE)
+
+BISON_WERROR :=