Use -Werror in hardware/interfaces

* Use hidl_defaults, which has -Wall -Werror.

Bug: 66996870
Test: build with WITH_TIDY=1
Change-Id: Ifbca0e176a8e031acc27256eb46d23b89cdf1a0e
diff --git a/bluetooth/1.0/default/Android.bp b/bluetooth/1.0/default/Android.bp
index 63e7562..48bbadf 100644
--- a/bluetooth/1.0/default/Android.bp
+++ b/bluetooth/1.0/default/Android.bp
@@ -115,6 +115,7 @@
 
 cc_binary {
     name: "android.hardware.bluetooth@1.0-service",
+    defaults: ["hidl_defaults"],
     relative_install_path: "hw",
     vendor: true,
     init_rc: ["android.hardware.bluetooth@1.0-service.rc"],
diff --git a/boot/1.0/default/Android.bp b/boot/1.0/default/Android.bp
index c9b7492..6cfbf32 100644
--- a/boot/1.0/default/Android.bp
+++ b/boot/1.0/default/Android.bp
@@ -1,5 +1,6 @@
 cc_library_shared {
     name: "android.hardware.boot@1.0-impl",
+    defaults: ["hidl_defaults"],
     relative_install_path: "hw",
     vendor: true,
     srcs: ["BootControl.cpp"],
@@ -17,6 +18,7 @@
 
 cc_binary {
     name: "android.hardware.boot@1.0-service",
+    defaults: ["hidl_defaults"],
     relative_install_path: "hw",
     vendor: true,
     init_rc: ["android.hardware.boot@1.0-service.rc"],
diff --git a/gatekeeper/1.0/default/Android.bp b/gatekeeper/1.0/default/Android.bp
index 4e6c9f0..ae3b91c 100644
--- a/gatekeeper/1.0/default/Android.bp
+++ b/gatekeeper/1.0/default/Android.bp
@@ -1,5 +1,6 @@
 cc_library_shared {
     name: "android.hardware.gatekeeper@1.0-impl",
+    defaults: ["hidl_defaults"],
     relative_install_path: "hw",
     vendor: true,
 
@@ -18,6 +19,7 @@
 
 cc_binary {
     name: "android.hardware.gatekeeper@1.0-service",
+    defaults: ["hidl_defaults"],
     relative_install_path: "hw",
     vendor: true,
     init_rc: ["android.hardware.gatekeeper@1.0-service.rc"],
diff --git a/gnss/1.0/default/Android.bp b/gnss/1.0/default/Android.bp
index 007ed97..ca495e6 100644
--- a/gnss/1.0/default/Android.bp
+++ b/gnss/1.0/default/Android.bp
@@ -1,5 +1,6 @@
 cc_library_shared {
     name: "android.hardware.gnss@1.0-impl",
+    defaults: ["hidl_defaults"],
     vendor: true,
     relative_install_path: "hw",
     srcs: [
@@ -27,14 +28,13 @@
         "libhardware",
     ],
 
-    cflags: ["-Werror"],
-
 }
 
 cc_binary {
     relative_install_path: "hw",
     vendor: true,
     name: "android.hardware.gnss@1.0-service",
+    defaults: ["hidl_defaults"],
     init_rc: ["android.hardware.gnss@1.0-service.rc"],
     srcs: ["service.cpp"],
 
diff --git a/soundtrigger/2.0/default/Android.mk b/soundtrigger/2.0/default/Android.mk
index 068c6b4..9262858 100644
--- a/soundtrigger/2.0/default/Android.mk
+++ b/soundtrigger/2.0/default/Android.mk
@@ -23,6 +23,8 @@
 LOCAL_SRC_FILES := \
     SoundTriggerHalImpl.cpp
 
+LOCAL_CFLAGS := -Wall -Werror
+
 LOCAL_SHARED_LIBRARIES := \
         libhidlbase \
         libhidltransport \
diff --git a/thermal/1.0/default/Android.bp b/thermal/1.0/default/Android.bp
index 2054b88..9d81474 100644
--- a/thermal/1.0/default/Android.bp
+++ b/thermal/1.0/default/Android.bp
@@ -34,6 +34,7 @@
 
 cc_binary {
     name: "android.hardware.thermal@1.0-service",
+    defaults: ["hidl_defaults"],
     relative_install_path: "hw",
     vendor: true,
     init_rc: ["android.hardware.thermal@1.0-service.rc"],
diff --git a/tv/cec/1.0/default/Android.bp b/tv/cec/1.0/default/Android.bp
index efb88ec..069f327 100644
--- a/tv/cec/1.0/default/Android.bp
+++ b/tv/cec/1.0/default/Android.bp
@@ -1,5 +1,6 @@
 cc_library_shared {
     name: "android.hardware.tv.cec@1.0-impl",
+    defaults: ["hidl_defaults"],
     vendor: true,
     relative_install_path: "hw",
     srcs: ["HdmiCec.cpp"],
@@ -18,6 +19,7 @@
 
 cc_binary {
     name: "android.hardware.tv.cec@1.0-service",
+    defaults: ["hidl_defaults"],
     relative_install_path: "hw",
     vendor: true,
     init_rc: ["android.hardware.tv.cec@1.0-service.rc"],
diff --git a/tv/input/1.0/default/Android.bp b/tv/input/1.0/default/Android.bp
index f8956f1..7c140a5 100644
--- a/tv/input/1.0/default/Android.bp
+++ b/tv/input/1.0/default/Android.bp
@@ -1,5 +1,6 @@
 cc_library_shared {
     name: "android.hardware.tv.input@1.0-impl",
+    defaults: ["hidl_defaults"],
     vendor: true,
     relative_install_path: "hw",
     srcs: ["TvInput.cpp"],
@@ -19,6 +20,7 @@
 
 cc_binary {
     name: "android.hardware.tv.input@1.0-service",
+    defaults: ["hidl_defaults"],
     relative_install_path: "hw",
     vendor: true,
     init_rc: ["android.hardware.tv.input@1.0-service.rc"],