From d4034097ab424d9f2f69ddb568e5c15a20d64d1c Mon Sep 17 00:00:00 2001 From: AmeChanRain Date: Thu, 5 Oct 2023 15:33:34 +0000 Subject: [PATCH] sdm660-common: gps: Fix misleading indentation * That makes clang17 happy * Fix: device/xiaomi/violet/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/violet/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 Signed-off-by: pix106 --- 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 9cbfabdc..a6a498e4 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();