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:
Saurabh Srivastava 2016-03-14 15:30:09 +05:30 committed by karthick111
parent e8042e98d2
commit 0070e5db4f
6 changed files with 63 additions and 12 deletions

View file

@ -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; }
};

View file

@ -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() {}

View file

@ -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;
}
};

View file

@ -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;

View file

@ -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;
}
};

View file

@ -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