Use -Werror in hardware/interfaces/biometrics/fingerprint
authorChih-Hung Hsieh <chh@google.com>
Tue, 21 Nov 2017 00:02:42 +0000 (16:02 -0800)
committerChih-Hung Hsieh <chh@google.com>
Tue, 28 Nov 2017 21:40:33 +0000 (13:40 -0800)
* Fix warning of unused function call result.

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

biometrics/fingerprint/2.1/default/Android.bp
biometrics/fingerprint/2.1/default/service.cpp

index e1d2cf709c82cccae59cc8517b8cb590692a2d56..b12ce61137199bfc3b7265bdcafdfb1cc88446eb 100644 (file)
@@ -1,5 +1,6 @@
 cc_binary {
     name: "android.hardware.biometrics.fingerprint@2.1-service",
+    defaults: ["hidl_defaults"],
     init_rc: ["android.hardware.biometrics.fingerprint@2.1-service.rc"],
     vendor: true,
     relative_install_path: "hw",
index 1697c07282cfb2054d299d569270cce65275184d..edfaac494c95829a56d70e944c6a47a80c380f88 100644 (file)
@@ -35,7 +35,9 @@ int main() {
     configureRpcThreadpool(1, true /*callerWillJoin*/);
 
     if (bio != nullptr) {
-        bio->registerAsService();
+        if (::android::OK != bio->registerAsService()) {
+            return 1;
+        }
     } else {
         ALOGE("Can't create instance of BiometricsFingerprint, nullptr");
     }