From 7d16e2dd04c1ec96845eac44c353e3a7a9d48873 Mon Sep 17 00:00:00 2001 From: Chih-Hung Hsieh Date: Wed, 11 Oct 2017 13:32:20 -0700 Subject: Use -Werror in external/opencv * Suppress existing warnings. Bug: 66996870 Test: build with WITH_TIDY=1 Change-Id: Ifbe2cf34b4c6230131a6a325d83f14c64920510f --- Android.mk | 27 ++++++++++++++++++++------- 1 file changed, 20 insertions(+), 7 deletions(-) diff --git a/Android.mk b/Android.mk index 4c5e09e..fe8970b 100644 --- a/Android.mk +++ b/Android.mk @@ -12,7 +12,9 @@ LOCAL_C_INCLUDES := \ $(LOCAL_PATH)/cxcore/include LOCAL_CFLAGS := $(LOCAL_C_INCLUDES:%=-I%) -LOCAL_CFLAGS += -Wno-unused-parameter +LOCAL_CFLAGS += \ + -Wall -Werror \ + -Wno-unused-parameter \ # cxmathfuncs.cpp has implicit cast of int struct fields. LOCAL_CLANG_CFLAGS += -Wno-c++11-narrowing @@ -64,10 +66,13 @@ LOCAL_C_INCLUDES := \ $(LOCAL_PATH)/cv/include LOCAL_CFLAGS := $(LOCAL_C_INCLUDES:%=-I%) -LOCAL_CFLAGS += -Wno-sizeof-pointer-memaccess \ +LOCAL_CFLAGS += \ + -Wall -Werror \ + -Wno-sizeof-pointer-memaccess \ -Wno-deprecated-register \ -Wno-sign-compare \ - -Wno-parentheses-equality + -Wno-parentheses-equality \ + -Wno-unused-variable LOCAL_TIDY_CHECKS := $(common_local_tidy_checks) @@ -153,7 +158,9 @@ LOCAL_C_INCLUDES := \ $(LOCAL_PATH)/cvaux/include LOCAL_CFLAGS := $(LOCAL_C_INCLUDES:%=-I%) -LOCAL_CFLAGS += -Wno-unused-parameter \ +LOCAL_CFLAGS += \ + -Wall -Werror \ + -Wno-unused-parameter \ -Wno-logical-op-parentheses \ -Wno-dangling-else \ -Wno-missing-field-initializers \ @@ -224,8 +231,11 @@ LOCAL_C_INCLUDES := \ $(LOCAL_PATH)/ml/include LOCAL_CFLAGS := $(LOCAL_C_INCLUDES:%=-I%) -LOCAL_CFLAGS += -Wno-logical-op-parentheses \ - -Wno-tautological-compare +LOCAL_CFLAGS += \ + -Wall -Werror \ + -Wno-logical-op-parentheses \ + -Wno-tautological-compare \ + -Wno-unused-variable LOCAL_SRC_FILES := \ ml/src/ml.cpp \ @@ -262,7 +272,9 @@ LOCAL_SHARED_LIBRARIES += libjpeg LOCAL_CFLAGS := $(LOCAL_C_INCLUDES:%=-I%) -DHAVE_JPEG -LOCAL_CFLAGS += -Wno-unused-parameter -Wno-logical-op-parentheses +LOCAL_CFLAGS += \ + -Wall -Werror \ + -Wno-unused-parameter -Wno-logical-op-parentheses \ # grfmt_tiff.cpp has implicit cast of int struct fields. LOCAL_CLANG_CFLAGS += -Wno-c++11-narrowing @@ -298,6 +310,7 @@ include $(LOCAL_PATH)/libopencv.mk LOCAL_CFLAGS := $(LOCAL_C_INCLUDES:%=-I%) +LOCAL_CFLAGS += -Wall -Werror LOCAL_SRC_FILES := \ WLNonFileByteStream.cpp -- cgit v1.2.3