diff --git a/gps/core/LBSProxyBase.h b/gps/core/LBSProxyBase.h index 0faf801..b3736c2 100644 --- a/gps/core/LBSProxyBase.h +++ b/gps/core/LBSProxyBase.h @@ -43,6 +43,10 @@ class LBSProxyBase { getLocApi(const MsgTask* msgTask, LOC_API_ADAPTER_EVENT_MASK_T exMask, ContextBase* context) const { + + (void)msgTask; + (void)exMask; + (void)context; return NULL; } protected: @@ -50,11 +54,21 @@ protected: public: inline virtual ~LBSProxyBase() {} inline virtual void requestUlp(LocAdapterBase* adapter, - unsigned long capabilities) const {} + unsigned long capabilities) const { + + (void)adapter; + (void)capabilities; + } inline virtual bool hasAgpsExtendedCapabilities() const { return false; } inline virtual bool hasCPIExtendedCapabilities() const { return false; } - inline virtual void modemPowerVote(bool power) const {} - virtual void injectFeatureConfig(ContextBase* context) const {} + inline virtual void modemPowerVote(bool power) const { + + (void)power; + } + virtual void injectFeatureConfig(ContextBase* context) const { + + (void)context; + } inline virtual IzatDevId_t getIzatDevId() const { return 0; } }; diff --git a/gps/core/LocAdapterBase.h b/gps/core/LocAdapterBase.h index d3adfe9..2268062 100644 --- a/gps/core/LocAdapterBase.h +++ b/gps/core/LocAdapterBase.h @@ -80,10 +80,16 @@ public: // This will be overridden by the individual adapters // if necessary. - inline virtual void setUlpProxy(UlpProxyBase* ulp) {} + inline virtual void setUlpProxy(UlpProxyBase* ulp) { + + (void)ulp; + } virtual void handleEngineUpEvent(); virtual void handleEngineDownEvent(); - inline virtual void setPositionModeInt(LocPosMode& posMode) {} + inline virtual void setPositionModeInt(LocPosMode& posMode) { + + (void)posMode; + } virtual void startFixInt() {} virtual void stopFixInt() {} virtual void getZppInt() {} diff --git a/gps/core/LocAdapterProxyBase.h b/gps/core/LocAdapterProxyBase.h index 1ddcca4..11859de 100644 --- a/gps/core/LocAdapterProxyBase.h +++ b/gps/core/LocAdapterProxyBase.h @@ -61,6 +61,11 @@ public: GpsLocationExtended &locationExtended, enum loc_sess_status status, LocPosTechMask loc_technology_mask) { + + (void)location; + (void)locationExtended; + (void)status; + (void)loc_technology_mask; return false; } }; diff --git a/gps/core/LocApiBase.h b/gps/core/LocApiBase.h index 9ea5560..18f8623 100644 --- a/gps/core/LocApiBase.h +++ b/gps/core/LocApiBase.h @@ -214,9 +214,15 @@ public: virtual void installAGpsCert(const DerEncodedCertificate* pData, size_t length, uint32_t slotBitMask); - inline virtual void setInSession(bool inSession) {} + inline virtual void setInSession(bool inSession) { + + (void)inSession; + } inline bool isMessageSupported (LocCheckingMessagesID msgID) const { - if (msgID > (sizeof(mSupportedMsg) << 3)) { + + // confirm if msgID is not larger than the number of bits in + // mSupportedMsg + if ((uint64_t)msgID > (sizeof(mSupportedMsg) << 3)) { return false; } else { uint32_t messageChecker = 1 << msgID; diff --git a/gps/core/UlpProxyBase.h b/gps/core/UlpProxyBase.h index 3db0837..b83f66b 100644 --- a/gps/core/UlpProxyBase.h +++ b/gps/core/UlpProxyBase.h @@ -59,24 +59,45 @@ public: void* locationExt, enum loc_sess_status status, LocPosTechMask loc_technology_mask) { + (void)location; + (void)locationExtended; + (void)locationExt; + (void)status; + (void)loc_technology_mask; return false; } inline virtual bool reportSv(QcomSvStatus &svStatus, GpsLocationExtended &locationExtended, void* svExt) { + (void)svStatus; + (void)locationExtended; + (void)svExt; return false; } inline virtual bool reportStatus(GpsStatusValue status) { + + (void)status; return false; } - inline virtual void setAdapter(LocAdapterBase* adapter) {} - inline virtual void setCapabilities(unsigned long capabilities) {} + inline virtual void setAdapter(LocAdapterBase* adapter) { + + (void)adapter; + } + inline virtual void setCapabilities(unsigned long capabilities) { + + (void)capabilities; + } inline virtual bool reportBatchingSession(FlpExtBatchOptions &options, bool active) { + + (void)options; + (void)active; return false; } inline virtual bool reportPositions(const struct FlpExtLocation_s* locations, int32_t number_of_locations) { + (void)locations; + (void)number_of_locations; return false; } }; diff --git a/gps/utils/Android.mk b/gps/utils/Android.mk index 37512a5..240d11f 100644 --- a/gps/utils/Android.mk +++ b/gps/utils/Android.mk @@ -25,10 +25,10 @@ LOCAL_SRC_FILES += \ MsgTask.cpp \ loc_misc_utils.cpp +# Flag -std=c++11 is not accepted by compiler when LOCAL_CLANG is set to true LOCAL_CFLAGS += \ -fno-short-enums \ - -D_ANDROID_ \ - -std=c++11 + -D_ANDROID_ ifeq ($(TARGET_BUILD_VARIANT),user) LOCAL_CFLAGS += -DTARGET_BUILD_VARIANT_USER @@ -60,7 +60,6 @@ LOCAL_COPY_HEADERS:= \ loc_misc_utils.h LOCAL_MODULE := libgps.utils -LOCAL_CLANG := false LOCAL_MODULE_TAGS := optional