From 57b2869a919f9b6bab8754d8e1ccf5782a0d1329 Mon Sep 17 00:00:00 2001 From: Pirama Arumuga Nainar Date: Tue, 29 Mar 2022 16:11:23 -0300 Subject: [PATCH] sm6375-common: Fix Wbitwise-instead-of-logical introduced by clang-r445002 Bug: http://b/215753485 This warning is introduced in clang-r445002. In code where the bitwise operation was used to avoid short-ciruit evaluation, make that explicit by introducing temporary variables. Test: build with clang-r445002. Change-Id: Ia7ccf1d48922d926313f691888d26c3e314c1056 Signed-off-by: kleidione --- gps/android/2.1/location_api/GnssAPIClient.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gps/android/2.1/location_api/GnssAPIClient.cpp b/gps/android/2.1/location_api/GnssAPIClient.cpp index 07f617d..e1dc0d4 100644 --- a/gps/android/2.1/location_api/GnssAPIClient.cpp +++ b/gps/android/2.1/location_api/GnssAPIClient.cpp @@ -648,7 +648,7 @@ void GnssAPIClient::onGnssNmeaCb(GnssNmeaNotification gnssNmeaNotification) auto gnssCbIface_2_1(mGnssCbIface_2_1); mMutex.unlock(); - if (gnssCbIface != nullptr || gnssCbIface_2_0 != nullptr| gnssCbIface_2_1 != nullptr) { + if (gnssCbIface != nullptr || gnssCbIface_2_0 != nullptr || gnssCbIface_2_1 != nullptr) { const std::string s(gnssNmeaNotification.nmea); std::stringstream ss(s); std::string each;