Use -Werror in hardware/interfaces
authorChih-Hung Hsieh <chh@google.com>
Mon, 20 Nov 2017 18:49:11 +0000 (10:49 -0800)
committerChih-Hung Hsieh <chh@google.com>
Mon, 20 Nov 2017 18:49:11 +0000 (10:49 -0800)
* Use hidl_defaults, which has -Wall -Werror.

Bug: 66996870
Test: build with WITH_TIDY=1
Change-Id: Ifbca0e176a8e031acc27256eb46d23b89cdf1a0e

bluetooth/1.0/default/Android.bp
boot/1.0/default/Android.bp
gatekeeper/1.0/default/Android.bp
gnss/1.0/default/Android.bp
soundtrigger/2.0/default/Android.mk
thermal/1.0/default/Android.bp
tv/cec/1.0/default/Android.bp
tv/input/1.0/default/Android.bp

index 63e75629b6dcf07a6cdd714438ed107fac82f5cc..48bbadf8a76f714552e8de3233277490cd214155 100644 (file)
@@ -115,6 +115,7 @@ cc_test_host {
 
 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"],
index c9b74925ee973375f80a48b125fdcc344645308f..6cfbf32eeb5e063da1d048949cdd85fb291ebfa8 100644 (file)
@@ -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_library_shared {
 
 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"],
index 4e6c9f04a386488ab6d63a4e661e6de8d712a3fd..ae3b91cd0366f2cd1fd82e7beb6398ce6a0856be 100644 (file)
@@ -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_library_shared {
 
 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"],
index 007ed975acf089fa0b0ce95091c261c46382b863..ca495e69597999bb25ca68455bc1e9ebd1bd9cbf 100644 (file)
@@ -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 @@ cc_library_shared {
         "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"],
 
index 068c6b4bbd0ae07c3f5094183d6e92f3548f4d12..926285862fcaa1e1249e5774f873d2e50868e5bf 100644 (file)
@@ -23,6 +23,8 @@ LOCAL_MODULE_RELATIVE_PATH := hw
 LOCAL_SRC_FILES := \
     SoundTriggerHalImpl.cpp
 
+LOCAL_CFLAGS := -Wall -Werror
+
 LOCAL_SHARED_LIBRARIES := \
         libhidlbase \
         libhidltransport \
index 2054b88f70c256c0603f56ad9851990625b26da0..9d81474b700965ec44bcdae9a1f4e7143a13538c 100644 (file)
@@ -34,6 +34,7 @@ cc_library_shared {
 
 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"],
index efb88ec559834de114ad9c5d23736b2ddf9623d8..069f327389a9afd7075625c596ae8b4516c79c88 100644 (file)
@@ -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_library_shared {
 
 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"],
index f8956f18ffbfbf01c2719e32b5b85950b10c53fc..7c140a5c4143d0ce8a796bfb4d2fb5c719823f09 100644 (file)
@@ -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_library_shared {
 
 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"],