Use -Werror in system/core/healthd

Bug: 66996870
Test: build with WITH_TIDY=1
Change-Id: I921735c9531594697e002937cd57a33c65552dbf
diff --git a/healthd/Android.bp b/healthd/Android.bp
index 95bb5f5..ea59469 100644
--- a/healthd/Android.bp
+++ b/healthd/Android.bp
@@ -9,6 +9,7 @@
 cc_library_static {
     name: "libbatterymonitor",
     srcs: ["BatteryMonitor.cpp"],
+    cflags: ["-Wall", "-Werror"],
     vendor_available: true,
     export_include_dirs: ["include"],
     shared_libs: [
@@ -27,6 +28,11 @@
         "healthd_common.cpp",
     ],
 
+    cflags: [
+        "-Wall",
+        "-Werror",
+    ],
+
     export_include_dirs: ["include"],
 
     shared_libs: [
@@ -56,7 +62,11 @@
         "HealthServiceDefault.cpp",
     ],
 
-    cflags: ["-DHEALTH_INSTANCE_NAME=\"default\""],
+    cflags: [
+        "-DHEALTH_INSTANCE_NAME=\"default\"",
+        "-Wall",
+        "-Werror",
+    ],
 
     static_libs: [
         "android.hardware.health@2.0-impl",
@@ -84,7 +94,11 @@
     ],
     local_include_dirs: ["include"],
 
-    cflags: ["-DHEALTH_INSTANCE_NAME=\"backup\""],
+    cflags: [
+        "-DHEALTH_INSTANCE_NAME=\"backup\"",
+        "-Wall",
+        "-Werror",
+    ],
 
     static_libs: [
         "android.hardware.health@2.0-impl",