From 5d63853d25ba88fa54e12aedac3bdf0dcead8e15 Mon Sep 17 00:00:00 2001 From: AmeChanRain Date: Thu, 5 Oct 2023 15:33:34 +0000 Subject: [PATCH] sm6375-common: gps: Fix misleading indentation * That makes clang17 happy * Fix: device/xiaomi/sm6150-common/gps/android/utils/battery_listener.cpp:191:13: error: misleading indentation; statement is not part of the previous 'if' [-Werror,-Wmisleading-indentation] auto r = mHealth->unlinkToDeath(this); ^ device/xiaomi/sm6150-common/gps/android/utils/battery_listener.cpp:189:9: note: previous statement is here if (mHealth != NULL) ^ 1 warning and 1 error generated. Change-Id: I3be1e3de45ce184c9d3dbcede57a312375a91498 Signed-off-by: Nanhumly --- gps/android/utils/battery_listener.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/gps/android/utils/battery_listener.cpp b/gps/android/utils/battery_listener.cpp index ac2ad27..f6a8259 100644 --- a/gps/android/utils/battery_listener.cpp +++ b/gps/android/utils/battery_listener.cpp @@ -184,13 +184,14 @@ BatteryListenerImpl::~BatteryListenerImpl() { { std::lock_guard _l(mLock); - if (mHealth != NULL) + if (mHealth != NULL) { mHealth->unregisterCallback(this); auto r = mHealth->unlinkToDeath(this); if (!r.isOk() || r == false) { LOC_LOGe("Transaction error in unregister to HealthHAL death: %s", r.description().c_str()); } + } } mDone = true; mThread->join();