remove unused variables for compilation

remove unsed variables and fix few compiler issues

CRs-fixed: 2175735
Change-Id: I635a7503326928f43070aa2224bc3c3d6e1ff929
This commit is contained in:
Dante Russo 2018-02-07 12:09:33 +05:30 committed by Vamana Murthi
parent 438abebca0
commit 97f3f3905a
13 changed files with 10 additions and 41 deletions

View file

@ -153,7 +153,7 @@ void BatchingAPIClient::onCapabilitiesCb(LocationCapabilitiesMask capabilitiesMa
mLocationCapabilitiesMask = capabilitiesMask;
}
void BatchingAPIClient::onBatchingCb(size_t count, Location* location, BatchingOptions batchOptions)
void BatchingAPIClient::onBatchingCb(size_t count, Location* location, BatchingOptions /*batchOptions*/)
{
LOC_LOGD("%s]: (count: %zu)", __FUNCTION__, count);
if (mGnssBatchingCbIface != nullptr && count > 0) {

View file

@ -63,7 +63,6 @@ public:
private:
sp<IGnssBatchingCallback> mGnssBatchingCbIface;
uint32_t mDefaultId;
int mBatchSize;
LocationCapabilitiesMask mLocationCapabilitiesMask;
};

View file

@ -504,7 +504,7 @@ static void convertGnssSvStatus(GnssSvNotification& in, IGnssCallback::GnssSvSta
memset(&out, 0, sizeof(IGnssCallback::GnssSvStatus));
out.numSvs = in.count;
if (out.numSvs > static_cast<uint32_t>(GnssMax::SVS_COUNT)) {
LOC_LOGW("%s]: Too many satellites %zd. Clamps to %d.",
LOC_LOGW("%s]: Too many satellites %u. Clamps to %d.",
__FUNCTION__, out.numSvs, GnssMax::SVS_COUNT);
out.numSvs = static_cast<uint32_t>(GnssMax::SVS_COUNT);
}

View file

@ -115,7 +115,7 @@ void MeasurementAPIClient::measurementClose() {
void MeasurementAPIClient::onGnssMeasurementsCb(
GnssMeasurementsNotification gnssMeasurementsNotification)
{
LOC_LOGD("%s]: (count: %zu active: %zu)",
LOC_LOGD("%s]: (count: %zu active: %d)",
__FUNCTION__, gnssMeasurementsNotification.count, mTracking);
if (mTracking) {
mMutex.lock();
@ -246,7 +246,7 @@ static void convertGnssData(GnssMeasurementsNotification& in,
{
out.measurementCount = in.count;
if (out.measurementCount > static_cast<uint32_t>(GnssMax::SVS_COUNT)) {
LOC_LOGW("%s]: Too many measurement %zd. Clamps to %d.",
LOC_LOGW("%s]: Too many measurement %u. Clamps to %d.",
__FUNCTION__, out.measurementCount, GnssMax::SVS_COUNT);
out.measurementCount = static_cast<uint32_t>(GnssMax::SVS_COUNT);
}

View file

@ -118,7 +118,7 @@ struct LocOpenMsg : public LocMsg {
mLocApi->open(mMask);
}
inline void locallog() const {
LOC_LOGV("%s:%d]: LocOpen Mask: %x\n",
LOC_LOGV("%s:%d]: LocOpen Mask: %" PRIu64 "\n",
__func__, __LINE__, mMask);
}
inline virtual void log() const {

View file

@ -68,7 +68,7 @@ IDataItemCore* DataItemsFactoryProxy::createNewDataItem(DataItemId id)
getConcreteDIFunc = (get_concrete_data_item_fn * )
dlsym(dataItemLibHandle, DATA_ITEMS_GET_CONCRETE_DI);
if (NULL != getConcreteDIFunc) {
LOC_LOGD("Loaded function %s : %x",DATA_ITEMS_GET_CONCRETE_DI,getConcreteDIFunc);
LOC_LOGD("Loaded function %s : %p",DATA_ITEMS_GET_CONCRETE_DI,getConcreteDIFunc);
mydi = (*getConcreteDIFunc)(id);
}
else {

View file

@ -100,26 +100,6 @@ const char* loc_get_position_recurrence_name(LocGpsPositionRecurrence recur)
return loc_get_name_from_val(loc_eng_position_recurrences, loc_eng_position_recurrence_num, (long) recur);
}
static const loc_name_val_s_type loc_eng_aiding_data_bits[] =
{
NAME_VAL( LOC_GPS_DELETE_EPHEMERIS ),
NAME_VAL( LOC_GPS_DELETE_ALMANAC ),
NAME_VAL( LOC_GPS_DELETE_POSITION ),
NAME_VAL( LOC_GPS_DELETE_TIME ),
NAME_VAL( LOC_GPS_DELETE_IONO ),
NAME_VAL( LOC_GPS_DELETE_UTC ),
NAME_VAL( LOC_GPS_DELETE_HEALTH ),
NAME_VAL( LOC_GPS_DELETE_SVDIR ),
NAME_VAL( LOC_GPS_DELETE_SVSTEER ),
NAME_VAL( LOC_GPS_DELETE_SADATA ),
NAME_VAL( LOC_GPS_DELETE_RTI ),
NAME_VAL( LOC_GPS_DELETE_CELLDB_INFO ),
NAME_VAL( LOC_GPS_DELETE_ALL)
};
static const int loc_eng_aiding_data_bit_num = sizeof(loc_eng_aiding_data_bits) / sizeof(loc_name_val_s_type);
const char* loc_get_aiding_data_mask_names(LocGpsAidingData /*data*/)
{
return NULL;

View file

@ -598,7 +598,7 @@ GnssAdapter::setSuplHostServer(const char* server, int port)
if ((NULL == server) || (server[0] == 0) ||
(strncasecmp(noHost, server, sizeof(noHost)) == 0)) {
serverUrl[0] = NULL;
serverUrl[0] = '\0';
length = 0;
mServerUrl.clear();
} else if (port > 0) {
@ -1173,7 +1173,7 @@ GnssAdapter::updateClientsEventMask()
mask |= LOC_API_ADAPTER_BIT_GNSS_MEASUREMENT;
mask |= LOC_API_ADAPTER_BIT_GNSS_SV_POLYNOMIAL_REPORT;
LOC_LOGD("%s]: Auto usecase, Enable MEAS/POLY - mask 0x%x", __func__, mask);
LOC_LOGD("%s]: Auto usecase, Enable MEAS/POLY - mask 0x%" PRIu64 "", __func__, mask);
}
if (mAgpsCbInfo.statusV4Cb != NULL) {

View file

@ -47,8 +47,8 @@ public :
// constructor & destructor
inline XtraSystemStatusObserver(IOsObserver* sysStatObs, const MsgTask* msgTask):
mSystemStatusObsrvr(sysStatObs), mMsgTask(msgTask),
mGpsLock(-1), mXtraThrottle(true), mReqStatusReceived(false), mDelayLocTimer(*this),
mIsConnectivityStatusKnown (false) {
mGpsLock(-1), mXtraThrottle(true), mReqStatusReceived(false),
mIsConnectivityStatusKnown (false), mDelayLocTimer(*this) {
subscribe(true);
startListeningNonBlocking(LOC_IPC_HAL);
mDelayLocTimer.start(100 /*.1 sec*/, false);

View file

@ -153,7 +153,6 @@ uint32_t LocationAPIControlClient::locAPIGnssUpdateConfig(GnssConfig config)
memcpy(&mConfig, &config, sizeof(GnssConfig));
uint32_t session = 0;
uint32_t* idArray = mLocationControlAPI->gnssUpdateConfig(config);
LOC_LOGV("%s:%d] gnssUpdateConfig return array: %p", __FUNCTION__, __LINE__, idArray);
if (idArray != nullptr) {

View file

@ -381,9 +381,6 @@ void loc_read_conf(const char* conf_file_name, const loc_param_s_type* config_ta
uint32_t table_length)
{
FILE *conf_fp = NULL;
char *lasts;
loc_param_v_type config_value;
uint32_t i;
if((conf_fp = fopen(conf_file_name, "r")) != NULL)
{

View file

@ -992,12 +992,7 @@ void loc_nmea_generate_sv(const GnssSvNotification &svNotify,
ENTRY_LOG();
char sentence[NMEA_SENTENCE_MAX_LENGTH] = {0};
char* pMarker = sentence;
int lengthRemaining = sizeof(sentence);
int length = 0;
int svCount = svNotify.count;
int sentenceCount = 0;
int sentenceNumber = 1;
int svNumber = 1;
//Count GPS SVs for saparating GPS from GLONASS and throw others

View file

@ -213,7 +213,6 @@ detected:
*/
int loc_identify_lean_target()
{
int ret = 0;
char lean_target[PROPERTY_VALUE_MAX];
property_get("ro.lean", lean_target, "");
LOC_LOGD("%s:%d]: lean target: %s\n", __func__, __LINE__, lean_target);