Use -Werror in external/libtextclassifier

* Suppress existing warnings, to catch new warnings.

Bug: 66996870
Test: build with WITH_TIDY=1
Change-Id: I23b1d57b5f49cd79f60145a25b24d3bbb8288337
diff --git a/Android.mk b/Android.mk
index f52a691..d3706b6 100644
--- a/Android.mk
+++ b/Android.mk
@@ -23,12 +23,18 @@
 LOCAL_PATH := $(call my-dir)
 
 # Custom C/C++ compilation flags:
-MY_LIBTEXTCLASSIFIER_CFLAGS := \
-    -Wno-unused-parameter \
-    -Wno-sign-compare \
-    -Wno-missing-field-initializers \
+MY_LIBTEXTCLASSIFIER_WARNING_CFLAGS := \
+    -Wall \
+    -Werror \
     -Wno-ignored-qualifiers \
+    -Wno-missing-field-initializers \
+    -Wno-sign-compare \
+    -Wno-tautological-constant-out-of-range-compare \
     -Wno-undefined-var-template \
+    -Wno-unused-parameter \
+
+MY_LIBTEXTCLASSIFIER_CFLAGS := \
+    $(MY_LIBTEXTCLASSIFIER_WARNING_CFLAGS) \
     -fvisibility=hidden
 
 # Only enable debug logging in userdebug/eng builds.
@@ -49,6 +55,8 @@
 LOCAL_SRC_FILES := $(call all-proto-files-under, .)
 LOCAL_SHARED_LIBRARIES := libprotobuf-cpp-lite
 
+LOCAL_CFLAGS := $(MY_LIBTEXTCLASSIFIER_WARNING_CFLAGS)
+
 include $(BUILD_STATIC_LIBRARY)
 
 # -----------------
@@ -261,4 +269,5 @@
 LOCAL_REQUIRED_MODULES += textclassifier.smartselection.es.model
 LOCAL_REQUIRED_MODULES += textclassifier.smartselection.de.model
 LOCAL_REQUIRED_MODULES += textclassifier.smartselection.fr.model
+LOCAL_CFLAGS := $(MY_LIBTEXTCLASSIFIER_WARNING_CFLAGS)
 include $(BUILD_STATIC_LIBRARY)