From 5631258f073da42105ad925690684d74b568c9c3 Mon Sep 17 00:00:00 2001 From: Chih-Hung Hsieh Date: Mon, 20 Nov 2017 16:02:42 -0800 Subject: [PATCH] Use -Werror in hardware/interfaces/biometrics/fingerprint * 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 | 1 + biometrics/fingerprint/2.1/default/service.cpp | 4 +++- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/biometrics/fingerprint/2.1/default/Android.bp b/biometrics/fingerprint/2.1/default/Android.bp index e1d2cf709c..b12ce61137 100644 --- a/biometrics/fingerprint/2.1/default/Android.bp +++ b/biometrics/fingerprint/2.1/default/Android.bp @@ -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", diff --git a/biometrics/fingerprint/2.1/default/service.cpp b/biometrics/fingerprint/2.1/default/service.cpp index 1697c07282..edfaac494c 100644 --- a/biometrics/fingerprint/2.1/default/service.cpp +++ b/biometrics/fingerprint/2.1/default/service.cpp @@ -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"); }