Use -Werror in hardware/interfaces
authorChih-Hung Hsieh <chh@google.com>
Thu, 5 Oct 2017 05:22:46 +0000 (22:22 -0700)
committerChih-Hung Hsieh <chh@google.com>
Tue, 17 Oct 2017 17:12:29 +0000 (10:12 -0700)
* Fix warning of unused result.

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

tests/extension/light/2.0/default/Android.bp
tests/extension/light/2.0/default/service.cpp
usb/1.0/default/Android.bp
vibrator/1.0/default/Android.bp

index 365a34ab02b69cd1df5bc55b2316ee87a132941b..dcac97cc3e18b03796e647dc0589285d50d4d688 100644 (file)
@@ -16,6 +16,7 @@
 
 cc_binary {
     name: "android.hardware.tests.extension.light@2.0-service",
+    defaults: ["hidl_defaults"],
     init_rc: ["android.hardware.tests.extension.light@2.0-service.rc"],
     vendor: true,
     relative_install_path: "hw",
index 4d839b2268146e6714caa65cb18118d3353090c1..af287e98bd07b09c1b24d7eb83950a1410770a2d 100644 (file)
@@ -30,6 +30,8 @@ using android::hardware::tests::extension::light::V2_0::implementation::Light;
 int main() {
     android::sp<ILight> service = new Light();
     configureRpcThreadpool(1, true /*callerWillJoin*/);
-    service->registerAsService();
+    if (service->registerAsService() != android::OK) {
+        exit(1);
+    }
     joinRpcThreadpool();
 }
index 2ebe61fde9a80db7be9c598e68d96cbbfb6b3438..64de8216d31ad4a5f27d1ce49dad9a2e20828540 100644 (file)
@@ -14,6 +14,7 @@
 
 cc_binary {
     name: "android.hardware.usb@1.0-service",
+    defaults: ["hidl_defaults"],
     init_rc: ["android.hardware.usb@1.0-service.rc"],
     relative_install_path: "hw",
     vendor: true,
index 9170b39db3f3168c0281332da31c9d0f7e97808c..0c7d1557eaeda752abb1c291ce240eb24504590a 100644 (file)
@@ -31,6 +31,7 @@ cc_library_shared {
 
 cc_binary {
     name: "android.hardware.vibrator@1.0-service",
+    defaults: ["hidl_defaults"],
     init_rc: ["android.hardware.vibrator@1.0-service.rc"],
     vendor: true,
     relative_install_path: "hw",