summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChih-Hung Hsieh <chh@google.com>2017-10-11 14:09:13 -0700
committerChih-Hung Hsieh <chh@google.com>2017-10-12 12:23:56 -0700
commit0f9576d2d2ca7d17f137a11567c4ea7d77a71ad4 (patch)
treed1f69f7bc1aae9225574fb2acef6351c4a285177
parent1416c244af01c9b4b1952bae1b84c6a347a68b2f (diff)
downloadsvox-0f9576d2d2ca7d17f137a11567c4ea7d77a71ad4.tar.gz
Use -Werror in external/svox
* Suppress existing warnings. * Use -Wno-error= to keep important warnings, to fix later. Bug: 66996870 Test: build with WITH_TIDY=1 Change-Id: Iee79b3233496325ebd4a259425bfe61803ed6616
-rwxr-xr-xpico/compat/jni/Android.mk4
-rw-r--r--pico/lib/Android.mk9
-rw-r--r--pico/tts/Android.mk12
3 files changed, 25 insertions, 0 deletions
diff --git a/pico/compat/jni/Android.mk b/pico/compat/jni/Android.mk
index 9b3ad60..55ebe5e 100755
--- a/pico/compat/jni/Android.mk
+++ b/pico/compat/jni/Android.mk
@@ -20,4 +20,8 @@ LOCAL_SHARED_LIBRARIES := \
liblog \
libdl
+LOCAL_CFLAGS := \
+ -Wall -Werror \
+ -Wno-unused-parameter
+
include $(BUILD_SHARED_LIBRARY)
diff --git a/pico/lib/Android.mk b/pico/lib/Android.mk
index cdf0026..c00932f 100644
--- a/pico/lib/Android.mk
+++ b/pico/lib/Android.mk
@@ -40,6 +40,15 @@ LOCAL_SRC_FILES := \
LOCAL_CFLAGS+= $(TOOL_CFLAGS)
LOCAL_LDFLAGS+= $(TOOL_LDFLAGS)
+LOCAL_CFLAGS += \
+ -Wall -Werror \
+ -Wno-error=infinite-recursion \
+ -Wno-parentheses-equality \
+ -Wno-self-assign \
+ -Wno-sign-compare \
+ -Wno-unneeded-internal-declaration \
+ -Wno-unused-parameter \
+
include $(BUILD_STATIC_LIBRARY)
diff --git a/pico/tts/Android.mk b/pico/tts/Android.mk
index 0f0d737..8eb827d 100644
--- a/pico/tts/Android.mk
+++ b/pico/tts/Android.mk
@@ -1,5 +1,11 @@
LOCAL_PATH := $(call my-dir)
+svox_tts_warn_flags := \
+ -Wall -Werror \
+ -Wno-sign-compare \
+ -Wno-unused-const-variable \
+ -Wno-unused-parameter \
+
# Build static library containing all PICO code
# excluding the compatibility code. This is identical
# to the rule below / except that it builds a shared
@@ -9,6 +15,8 @@ include $(CLEAR_VARS)
LOCAL_MODULE := libttspico_engine
LOCAL_MULTILIB := 32
+LOCAL_CFLAGS := $(svox_tts_warn_flags)
+
LOCAL_SRC_FILES := \
com_svox_picottsengine.cpp \
svox_ssml_parser.cpp
@@ -43,6 +51,8 @@ LOCAL_SRC_FILES := \
com_svox_picottsengine.cpp \
svox_ssml_parser.cpp
+LOCAL_CFLAGS := $(svox_tts_warn_flags)
+
LOCAL_C_INCLUDES += \
external/svox/pico/lib \
external/svox/pico/compat/include
@@ -51,3 +61,5 @@ LOCAL_STATIC_LIBRARIES := libsvoxpico
LOCAL_SHARED_LIBRARIES := libcutils libexpat libutils liblog
include $(BUILD_SHARED_LIBRARY)
+
+svox_tts_warn_flags :=