From f52e7212645b2bab9267e8127ebd925922cafeec Mon Sep 17 00:00:00 2001 From: Chih-Hung Hsieh Date: Wed, 11 Oct 2017 13:08:29 -0700 Subject: [PATCH] Use -Werror in external/mksh * Suppress existing warnings. Bug: 66996870 Test: build with WITH_TIDY=1 Change-Id: I8e8e88745daaf2fbaef2a8ba373d6de1039fe030 --- Android.mk | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/Android.mk b/Android.mk index 5a53d9f..bcb5b32 100644 --- a/Android.mk +++ b/Android.mk @@ -33,8 +33,12 @@ MKSH_SRC_FILES := \ MKSH_INCLUDES := $(LOCAL_PATH)/src # Compiler flags... -MKSH_CFLAGS += \ +MKSH_WARNING_CFLAGS := \ + -Wall -Werror \ -Wno-deprecated-declarations \ + +MKSH_CFLAGS += \ + $(MKSH_WARNING_CFLAGS) \ -fno-asynchronous-unwind-tables \ -fno-strict-aliasing \ -fstack-protector -fwrapv \ @@ -150,6 +154,7 @@ LOCAL_MODULE := sh_vendor LOCAL_MODULE_STEM := sh LOCAL_ADDITIONAL_DEPENDENCIES += $(LOCAL_PATH)/Android.mk LOCAL_MODULE_PATH := $(TARGET_OUT_VENDOR_EXECUTABLES) +LOCAL_CFLAGS := $(MKSH_WARNING_CFLAGS) # mksh source files LOCAL_SRC_FILES := $(MKSH_SRC_FILES) @@ -169,4 +174,5 @@ include $(BUILD_EXECUTABLE) MKSH_SRC_FILES:= MKSH_CFLAGS:= +MKSH_WARNING_CFLAGS:= MKSH_INCLUDES:=