msm8974-common: gps: Enabling CLANG compilation and fixing all resulting errors
Removing statement to set LOCAL_CLANG flag explicity to true. It will be true by default. Change-Id: I2eaba5a89e64088e3383b962dceaaa7e975e997a CRs-Fixed: 989476
This commit is contained in:
parent
0551f61a2a
commit
08edaade5f
@ -43,6 +43,10 @@ class LBSProxyBase {
|
|||||||
getLocApi(const MsgTask* msgTask,
|
getLocApi(const MsgTask* msgTask,
|
||||||
LOC_API_ADAPTER_EVENT_MASK_T exMask,
|
LOC_API_ADAPTER_EVENT_MASK_T exMask,
|
||||||
ContextBase* context) const {
|
ContextBase* context) const {
|
||||||
|
|
||||||
|
(void)msgTask;
|
||||||
|
(void)exMask;
|
||||||
|
(void)context;
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
protected:
|
protected:
|
||||||
@ -50,11 +54,21 @@ protected:
|
|||||||
public:
|
public:
|
||||||
inline virtual ~LBSProxyBase() {}
|
inline virtual ~LBSProxyBase() {}
|
||||||
inline virtual void requestUlp(LocAdapterBase* adapter,
|
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 hasAgpsExtendedCapabilities() const { return false; }
|
||||||
inline virtual bool hasCPIExtendedCapabilities() const { return false; }
|
inline virtual bool hasCPIExtendedCapabilities() const { return false; }
|
||||||
inline virtual void modemPowerVote(bool power) const {}
|
inline virtual void modemPowerVote(bool power) const {
|
||||||
virtual void injectFeatureConfig(ContextBase* context) const {}
|
|
||||||
|
(void)power;
|
||||||
|
}
|
||||||
|
virtual void injectFeatureConfig(ContextBase* context) const {
|
||||||
|
|
||||||
|
(void)context;
|
||||||
|
}
|
||||||
inline virtual IzatDevId_t getIzatDevId() const { return 0; }
|
inline virtual IzatDevId_t getIzatDevId() const { return 0; }
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -80,10 +80,16 @@ public:
|
|||||||
|
|
||||||
// This will be overridden by the individual adapters
|
// This will be overridden by the individual adapters
|
||||||
// if necessary.
|
// if necessary.
|
||||||
inline virtual void setUlpProxy(UlpProxyBase* ulp) {}
|
inline virtual void setUlpProxy(UlpProxyBase* ulp) {
|
||||||
|
|
||||||
|
(void)ulp;
|
||||||
|
}
|
||||||
virtual void handleEngineUpEvent();
|
virtual void handleEngineUpEvent();
|
||||||
virtual void handleEngineDownEvent();
|
virtual void handleEngineDownEvent();
|
||||||
inline virtual void setPositionModeInt(LocPosMode& posMode) {}
|
inline virtual void setPositionModeInt(LocPosMode& posMode) {
|
||||||
|
|
||||||
|
(void)posMode;
|
||||||
|
}
|
||||||
virtual void startFixInt() {}
|
virtual void startFixInt() {}
|
||||||
virtual void stopFixInt() {}
|
virtual void stopFixInt() {}
|
||||||
virtual void getZppInt() {}
|
virtual void getZppInt() {}
|
||||||
|
@ -61,6 +61,11 @@ public:
|
|||||||
GpsLocationExtended &locationExtended,
|
GpsLocationExtended &locationExtended,
|
||||||
enum loc_sess_status status,
|
enum loc_sess_status status,
|
||||||
LocPosTechMask loc_technology_mask) {
|
LocPosTechMask loc_technology_mask) {
|
||||||
|
|
||||||
|
(void)location;
|
||||||
|
(void)locationExtended;
|
||||||
|
(void)status;
|
||||||
|
(void)loc_technology_mask;
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
@ -214,9 +214,15 @@ public:
|
|||||||
virtual void installAGpsCert(const DerEncodedCertificate* pData,
|
virtual void installAGpsCert(const DerEncodedCertificate* pData,
|
||||||
size_t length,
|
size_t length,
|
||||||
uint32_t slotBitMask);
|
uint32_t slotBitMask);
|
||||||
inline virtual void setInSession(bool inSession) {}
|
inline virtual void setInSession(bool inSession) {
|
||||||
|
|
||||||
|
(void)inSession;
|
||||||
|
}
|
||||||
inline bool isMessageSupported (LocCheckingMessagesID msgID) const {
|
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;
|
return false;
|
||||||
} else {
|
} else {
|
||||||
uint32_t messageChecker = 1 << msgID;
|
uint32_t messageChecker = 1 << msgID;
|
||||||
|
@ -59,24 +59,45 @@ public:
|
|||||||
void* locationExt,
|
void* locationExt,
|
||||||
enum loc_sess_status status,
|
enum loc_sess_status status,
|
||||||
LocPosTechMask loc_technology_mask) {
|
LocPosTechMask loc_technology_mask) {
|
||||||
|
(void)location;
|
||||||
|
(void)locationExtended;
|
||||||
|
(void)locationExt;
|
||||||
|
(void)status;
|
||||||
|
(void)loc_technology_mask;
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
inline virtual bool reportSv(HaxxSvStatus &svStatus,
|
inline virtual bool reportSv(HaxxSvStatus &svStatus,
|
||||||
GpsLocationExtended &locationExtended,
|
GpsLocationExtended &locationExtended,
|
||||||
void* svExt) {
|
void* svExt) {
|
||||||
|
(void)svStatus;
|
||||||
|
(void)locationExtended;
|
||||||
|
(void)svExt;
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
inline virtual bool reportStatus(GpsStatusValue status) {
|
inline virtual bool reportStatus(GpsStatusValue status) {
|
||||||
|
|
||||||
|
(void)status;
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
inline virtual void setAdapter(LocAdapterBase* adapter) {}
|
inline virtual void setAdapter(LocAdapterBase* adapter) {
|
||||||
inline virtual void setCapabilities(unsigned long capabilities) {}
|
|
||||||
|
(void)adapter;
|
||||||
|
}
|
||||||
|
inline virtual void setCapabilities(unsigned long capabilities) {
|
||||||
|
|
||||||
|
(void)capabilities;
|
||||||
|
}
|
||||||
inline virtual bool reportBatchingSession(FlpExtBatchOptions &options,
|
inline virtual bool reportBatchingSession(FlpExtBatchOptions &options,
|
||||||
bool active) {
|
bool active) {
|
||||||
|
|
||||||
|
(void)options;
|
||||||
|
(void)active;
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
inline virtual bool reportPositions(const struct FlpExtLocation_s* locations,
|
inline virtual bool reportPositions(const struct FlpExtLocation_s* locations,
|
||||||
int32_t number_of_locations) {
|
int32_t number_of_locations) {
|
||||||
|
(void)locations;
|
||||||
|
(void)number_of_locations;
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
@ -21,10 +21,10 @@ LOCAL_SRC_FILES += \
|
|||||||
MsgTask.cpp \
|
MsgTask.cpp \
|
||||||
loc_misc_utils.cpp
|
loc_misc_utils.cpp
|
||||||
|
|
||||||
|
# Flag -std=c++11 is not accepted by compiler when LOCAL_CLANG is set to true
|
||||||
LOCAL_CFLAGS += \
|
LOCAL_CFLAGS += \
|
||||||
-fno-short-enums \
|
-fno-short-enums \
|
||||||
-D_ANDROID_ \
|
-D_ANDROID_
|
||||||
-std=c++11
|
|
||||||
|
|
||||||
ifeq ($(TARGET_BUILD_VARIANT),user)
|
ifeq ($(TARGET_BUILD_VARIANT),user)
|
||||||
LOCAL_CFLAGS += -DTARGET_BUILD_VARIANT_USER
|
LOCAL_CFLAGS += -DTARGET_BUILD_VARIANT_USER
|
||||||
@ -56,7 +56,6 @@ LOCAL_COPY_HEADERS:= \
|
|||||||
loc_misc_utils.h
|
loc_misc_utils.h
|
||||||
|
|
||||||
LOCAL_MODULE := libgps.utils
|
LOCAL_MODULE := libgps.utils
|
||||||
LOCAL_CLANG := false
|
|
||||||
|
|
||||||
LOCAL_MODULE_TAGS := optional
|
LOCAL_MODULE_TAGS := optional
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user