From 8ab15e722f4b862390f14b7a81f340ac1c439cd7 Mon Sep 17 00:00:00 2001 From: Pirama Arumuga Nainar Date: Thu, 3 Feb 2022 19:59:32 -0800 Subject: [PATCH] sm8450-common: gps: Fix -Wbitwise-instead-of-logical Bug: http://b/215753485 Reported by clang-r445002 error: use of bitwise '|' with boolean operands [-Werro r,-Wbitwise-instead-of-logical] if (gnssCbIface != nullptr || gnssCbIface_2_0 != nullptr| gnssCbIface_2_1 != nullptr) { ^~~~~~~~~~~~~~~~~~~~~~~~~~~~ || Test: build with clang-r445002 Change-Id: I9410eb5208227dd70bd036aee02fb2aeb912f266 Merged-In: I9410eb5208227dd70bd036aee02fb2aeb912f266 --- 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 784227b..8d83881 100644 --- a/gps/android/2.1/location_api/GnssAPIClient.cpp +++ b/gps/android/2.1/location_api/GnssAPIClient.cpp @@ -681,7 +681,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;