From 3094f39138739a796d0d683d637f87f9dc97328a Mon Sep 17 00:00:00 2001 From: Michael Bestas Date: Wed, 6 Jan 2021 19:23:51 +0200 Subject: [PATCH] sm8450-common: gps: Resolve unused parameter warnings Change-Id: I0acef3da2c3567a28edd0a71dac89a5828f7725d --- gps/android/2.1/Gnss.cpp | 4 ++-- gps/android/2.1/GnssConfiguration.cpp | 2 +- gps/core/LBSProxyBase.h | 2 +- gps/core/LocAdapterBase.cpp | 10 +++++----- gps/core/LocApiBase.cpp | 14 +++++++------- gps/core/LocApiBase.h | 12 ++++++------ gps/core/SystemStatus.h | 2 +- gps/geofence/GeofenceAdapter.cpp | 12 ++++++------ gps/gnss/XtraSystemStatusObserver.cpp | 4 ++-- gps/location/ILocationAPI.h | 2 +- gps/pla/android/loc_pla.h | 2 +- gps/utils/LocIpc.h | 6 +++--- gps/utils/loc_log.cpp | 2 +- 13 files changed, 37 insertions(+), 37 deletions(-) diff --git a/gps/android/2.1/Gnss.cpp b/gps/android/2.1/Gnss.cpp index cbdb5d8..7ea2a42 100644 --- a/gps/android/2.1/Gnss.cpp +++ b/gps/android/2.1/Gnss.cpp @@ -342,8 +342,8 @@ Return Gnss::injectLocation(double latitudeDegrees, } } -Return Gnss::injectTime(int64_t timeMs, int64_t timeReferenceMs, - int32_t uncertaintyMs) { +Return Gnss::injectTime(int64_t timeMs __unused, int64_t timeReferenceMs __unused, + int32_t uncertaintyMs __unused) { return true; } diff --git a/gps/android/2.1/GnssConfiguration.cpp b/gps/android/2.1/GnssConfiguration.cpp index f79207e..8cdc15b 100644 --- a/gps/android/2.1/GnssConfiguration.cpp +++ b/gps/android/2.1/GnssConfiguration.cpp @@ -39,7 +39,7 @@ GnssConfiguration::GnssConfiguration(Gnss* gnss) : mGnss(gnss) { } // Methods from ::android::hardware::gps::V1_0::IGnssConfiguration follow. -Return GnssConfiguration::setSuplEs(bool enabled) { +Return GnssConfiguration::setSuplEs(bool enabled __unused) { // deprecated function. Must return false to pass VTS return false; } diff --git a/gps/core/LBSProxyBase.h b/gps/core/LBSProxyBase.h index 851373a..94d426c 100644 --- a/gps/core/LBSProxyBase.h +++ b/gps/core/LBSProxyBase.h @@ -61,7 +61,7 @@ public: } inline virtual bool hasNativeXtraClient() const { return false; } inline virtual IzatDevId_t getIzatDevId() const { return 0; } - virtual void setIzatFusedProviderOverride(bool izatFused) {} + virtual void setIzatFusedProviderOverride(bool izatFused __unused) {} virtual bool getIzatFusedProviderOverride() const { return false; } }; diff --git a/gps/core/LocAdapterBase.cpp b/gps/core/LocAdapterBase.cpp index 2bdcaa6..5713fe9 100644 --- a/gps/core/LocAdapterBase.cpp +++ b/gps/core/LocAdapterBase.cpp @@ -88,8 +88,8 @@ void LocAdapterBase:: const GpsLocationExtended& locationExtended, enum loc_sess_status status, LocPosTechMask loc_technology_mask, - GnssDataNotification* pDataNotify, - int msInWeek) + GnssDataNotification* pDataNotify __unused, + int msInWeek __unused) { if (mLocAdapterProxyBase != NULL) { mLocAdapterProxyBase->reportPositionEvent((UlpLocation&)location, @@ -161,7 +161,7 @@ DEFAULT_IMPL(false) bool LocAdapterBase:: requestNiNotifyEvent(const GnssNiNotification &/*notify*/, const void* /*data*/, - const LocInEmergency emergencyState) + const LocInEmergency /*emergencyState*/) DEFAULT_IMPL(false) void LocAdapterBase:: @@ -347,7 +347,7 @@ LocAdapterBase::updateClientsEventMask() DEFAULT_IMPL() void -LocAdapterBase::stopClientSessions(LocationAPI* client, bool eraseSession) +LocAdapterBase::stopClientSessions(LocationAPI* /*client*/, bool /*eraseSession*/) DEFAULT_IMPL() void @@ -436,7 +436,7 @@ LocAdapterBase::reportLatencyInfoEvent(const GnssLatencyInfo& /*gnssLatencyInfo* DEFAULT_IMPL() bool LocAdapterBase:: - reportQwesCapabilities(const std::unordered_map &featureMap) + reportQwesCapabilities(const std::unordered_map &/*featureMap*/) DEFAULT_IMPL(false) } // namespace loc_core diff --git a/gps/core/LocApiBase.cpp b/gps/core/LocApiBase.cpp index 1931b7b..7ac9037 100644 --- a/gps/core/LocApiBase.cpp +++ b/gps/core/LocApiBase.cpp @@ -905,33 +905,33 @@ void LocApiBase:: DEFAULT_IMPL() void LocApiBase:: - getRobustLocationConfig(uint32_t sessionId, LocApiResponse* /*adapterResponse*/) + getRobustLocationConfig(uint32_t /*sessionId*/, LocApiResponse* /*adapterResponse*/) DEFAULT_IMPL() void LocApiBase:: - configMinGpsWeek(uint16_t minGpsWeek, + configMinGpsWeek(uint16_t /*minGpsWeek*/, LocApiResponse* /*adapterResponse*/) DEFAULT_IMPL() void LocApiBase:: - getMinGpsWeek(uint32_t sessionId, LocApiResponse* /*adapterResponse*/) + getMinGpsWeek(uint32_t /*sessionId*/, LocApiResponse* /*adapterResponse*/) DEFAULT_IMPL() LocationError LocApiBase:: - setParameterSync(const GnssConfig& gnssConfig) + setParameterSync(const GnssConfig& /*gnssConfig*/) DEFAULT_IMPL(LOCATION_ERROR_SUCCESS) void LocApiBase:: - getParameter(uint32_t sessionId, GnssConfigFlagsMask flags, LocApiResponse* /*adapterResponse*/) + getParameter(uint32_t /*sessionId*/, GnssConfigFlagsMask /*flags*/, LocApiResponse* /*adapterResponse*/) DEFAULT_IMPL() void LocApiBase:: - configConstellationMultiBand(const GnssSvTypeConfig& secondaryBandConfig, + configConstellationMultiBand(const GnssSvTypeConfig& /*secondaryBandConfig*/, LocApiResponse* /*adapterResponse*/) DEFAULT_IMPL() void LocApiBase:: - getConstellationMultiBandConfig(uint32_t sessionId, LocApiResponse* /*adapterResponse*/) + getConstellationMultiBandConfig(uint32_t /*sessionId*/, LocApiResponse* /*adapterResponse*/) DEFAULT_IMPL() int64_t ElapsedRealtimeEstimator::getElapsedRealtimeEstimateNanos(int64_t curDataTimeNanos, diff --git a/gps/core/LocApiBase.h b/gps/core/LocApiBase.h index e26c00a..9269e08 100644 --- a/gps/core/LocApiBase.h +++ b/gps/core/LocApiBase.h @@ -101,12 +101,12 @@ public: inline LocApiProxyBase() {} inline virtual ~LocApiProxyBase() {} inline virtual void* getSibling2() { return NULL; } - inline virtual double getGloRfLoss(uint32_t left, - uint32_t center, uint32_t right, uint8_t gloFrequency) { return 0.0; } - inline virtual bool getSatellitePVT(GnssSvPolynomial& svPolynomial, - GnssSvMeasurementHeader& svMeasSetHeader, - GnssMeasurementsData& measurementData) { return false; } - inline virtual float getGeoidalSeparation(double latitude, double longitude) { return 0.0; } + inline virtual double getGloRfLoss(uint32_t left __unused, + uint32_t center __unused, uint32_t right __unused, uint8_t gloFrequency __unused) { return 0.0; } + inline virtual bool getSatellitePVT(GnssSvPolynomial& svPolynomial __unused, + GnssSvMeasurementHeader& svMeasSetHeader __unused, + GnssMeasurementsData& measurementData __unused) { return false; } + inline virtual float getGeoidalSeparation(double latitude __unused, double longitude __unused) { return 0.0; } }; class LocApiBase { diff --git a/gps/core/SystemStatus.h b/gps/core/SystemStatus.h index 78d58ea..4574333 100644 --- a/gps/core/SystemStatus.h +++ b/gps/core/SystemStatus.h @@ -88,7 +88,7 @@ public: } virtual void dump(void) {}; inline virtual bool ignore() { return false; }; - virtual bool equals(const SystemStatusItemBase& peer) { return false; } + virtual bool equals(const SystemStatusItemBase& peer __unused) { return false; } }; class SystemStatusLocation : public SystemStatusItemBase diff --git a/gps/geofence/GeofenceAdapter.cpp b/gps/geofence/GeofenceAdapter.cpp index 2eaf155..5ce300e 100644 --- a/gps/geofence/GeofenceAdapter.cpp +++ b/gps/geofence/GeofenceAdapter.cpp @@ -209,7 +209,7 @@ GeofenceAdapter::restartGeofences() if (LOCATION_ERROR_SUCCESS == err) { if (true == object.paused) { mLocApi->pauseGeofence(data.hwId, object.key.id, - new LocApiResponse(*getContext(), [] (LocationError err ) {})); + new LocApiResponse(*getContext(), [] (LocationError err __unused) {})); } saveGeofenceItem(object.key.client, object.key.id, data.hwId, options, info); } @@ -287,7 +287,7 @@ GeofenceAdapter::addGeofencesCommand(LocationAPI* client, size_t count, Geofence mApi.addToCallQueue(new LocApiResponse(*mAdapter.getContext(), [&mAdapter = mAdapter, mCount = mCount, mClient = mClient, mOptions = mOptions, mInfos = mInfos, mIds = mIds, &mApi = mApi, - errs, i] (LocationError err ) { + errs, i] (LocationError err __unused) { mApi.addGeofence(mIds[i], mOptions[i], mInfos[i], new LocApiResponseData(*mAdapter.getContext(), [&mAdapter = mAdapter, mOptions = mOptions, mClient = mClient, @@ -388,7 +388,7 @@ GeofenceAdapter::removeGeofencesCommand(LocationAPI* client, size_t count, uint3 for (size_t i=0; i < mCount; ++i) { mApi.addToCallQueue(new LocApiResponse(*mAdapter.getContext(), [&mAdapter = mAdapter, mCount = mCount, mClient = mClient, mIds = mIds, - &mApi = mApi, errs, i] (LocationError err ) { + &mApi = mApi, errs, i] (LocationError err __unused) { uint32_t hwId = 0; errs[i] = mAdapter.getHwIdFromClient(mClient, mIds[i], hwId); if (LOCATION_ERROR_SUCCESS == errs[i]) { @@ -464,7 +464,7 @@ GeofenceAdapter::pauseGeofencesCommand(LocationAPI* client, size_t count, uint32 for (size_t i=0; i < mCount; ++i) { mApi.addToCallQueue(new LocApiResponse(*mAdapter.getContext(), [&mAdapter = mAdapter, mCount = mCount, mClient = mClient, mIds = mIds, - &mApi = mApi, errs, i] (LocationError err ) { + &mApi = mApi, errs, i] (LocationError err __unused) { uint32_t hwId = 0; errs[i] = mAdapter.getHwIdFromClient(mClient, mIds[i], hwId); if (LOCATION_ERROR_SUCCESS == errs[i]) { @@ -539,7 +539,7 @@ GeofenceAdapter::resumeGeofencesCommand(LocationAPI* client, size_t count, uint3 for (size_t i=0; i < mCount; ++i) { mApi.addToCallQueue(new LocApiResponse(*mAdapter.getContext(), [&mAdapter = mAdapter, mCount = mCount, mClient = mClient, mIds = mIds, - &mApi = mApi, errs, i] (LocationError err ) { + &mApi = mApi, errs, i] (LocationError err __unused) { uint32_t hwId = 0; errs[i] = mAdapter.getHwIdFromClient(mClient, mIds[i], hwId); if (LOCATION_ERROR_SUCCESS == errs[i]) { @@ -622,7 +622,7 @@ GeofenceAdapter::modifyGeofencesCommand(LocationAPI* client, size_t count, uint3 } else { mApi.addToCallQueue(new LocApiResponse(*mAdapter.getContext(), [&mAdapter = mAdapter, mCount = mCount, mClient = mClient, mIds = mIds, - &mApi = mApi, mOptions = mOptions, errs, i] (LocationError err ) { + &mApi = mApi, mOptions = mOptions, errs, i] (LocationError err __unused) { uint32_t hwId = 0; errs[i] = mAdapter.getHwIdFromClient(mClient, mIds[i], hwId); if (LOCATION_ERROR_SUCCESS == errs[i]) { diff --git a/gps/gnss/XtraSystemStatusObserver.cpp b/gps/gnss/XtraSystemStatusObserver.cpp index 78fa231..8e1b99e 100644 --- a/gps/gnss/XtraSystemStatusObserver.cpp +++ b/gps/gnss/XtraSystemStatusObserver.cpp @@ -65,8 +65,8 @@ public: inline XtraIpcListener(IOsObserver* observer, const MsgTask* msgTask, XtraSystemStatusObserver& xsso) : mSystemStatusObsrvr(observer), mMsgTask(msgTask), mXSSO(xsso) {} - virtual void onReceive(const char* data, uint32_t length, - const LocIpcRecver* recver) override { + virtual void onReceive(const char* data, uint32_t length __unused, + const LocIpcRecver* recver __unused) override { #define STRNCMP(str, constStr) strncmp(str, constStr, sizeof(constStr)-1) if (!STRNCMP(data, "ping")) { LOC_LOGd("ping received"); diff --git a/gps/location/ILocationAPI.h b/gps/location/ILocationAPI.h index 868e99c..00218f7 100644 --- a/gps/location/ILocationAPI.h +++ b/gps/location/ILocationAPI.h @@ -445,7 +445,7 @@ public: @return No return value. */ - virtual void powerStateEvent(PowerStateType powerState) {}; + virtual void powerStateEvent(PowerStateType powerState __unused) {}; }; #endif /* ILOCATIONAPI_H */ diff --git a/gps/pla/android/loc_pla.h b/gps/pla/android/loc_pla.h index fb06c28..1b3c96b 100644 --- a/gps/pla/android/loc_pla.h +++ b/gps/pla/android/loc_pla.h @@ -86,7 +86,7 @@ static inline size_t memscpy (void *p_Dest, size_t q_DestSize, const void *p_Src } /*API for boot kpi marker prints */ -inline int loc_boot_kpi_marker(const char * pFmt, ...) +inline int loc_boot_kpi_marker(const char * pFmt __unused, ...) { return -1; } diff --git a/gps/utils/LocIpc.h b/gps/utils/LocIpc.h index e3a4848..ec8c8fc 100644 --- a/gps/utils/LocIpc.h +++ b/gps/utils/LocIpc.h @@ -87,7 +87,7 @@ public: } virtual void onServiceStatusChange(int sericeId, int instanceId, ServiceStatus status, const LocIpcSender& sender) = 0; - inline virtual void onClientGone(int nodeId, int portId) {} + inline virtual void onClientGone(int nodeId __unused, int portId __unused) {} inline const unordered_set& getServicesToWatch() { return mServicesToWatch; } }; @@ -174,10 +174,10 @@ public: inline bool sendData(const uint8_t data[], uint32_t length, int32_t msgId) const { return isSendable() && (send(data, length, msgId) > 0); } - virtual unique_ptr getRecver(const shared_ptr& listener) { + virtual unique_ptr getRecver(const shared_ptr& listener __unused) { return nullptr; } - inline virtual bool copyDestAddrFrom(const LocIpcSender& otherSender) { return true; } + inline virtual bool copyDestAddrFrom(const LocIpcSender& otherSender __unused) { return true; } }; class LocIpcRecver { diff --git a/gps/utils/loc_log.cpp b/gps/utils/loc_log.cpp index b9ecd1b..dec5188 100644 --- a/gps/utils/loc_log.cpp +++ b/gps/utils/loc_log.cpp @@ -219,7 +219,7 @@ RETURN VALUE N/A ===========================================================================*/ -void log_buffer_insert(char *str, unsigned long buf_size, int level) +void log_buffer_insert(char *str, unsigned long buf_size __unused, int level) { timespec tv = {}; clock_gettime(CLOCK_BOOTTIME, &tv);