summaryrefslogtreecommitdiff
path: root/location/LocationAPIClientBase.cpp
diff options
context:
space:
mode:
authorBaili Feng <bailif@codeaurora.org>2017-07-03 21:00:31 +0800
committerYingjie Wang <yingjiewang@codeaurora.org>2017-08-01 18:17:20 +0800
commit4c9c7839892c4272c30dcf3288bbe4d52649bced (patch)
tree207223980b82203b9a1a092af8e90855fc91a69b /location/LocationAPIClientBase.cpp
parent0c6ed3c02457e1a77b6221191c3dfb89574742ba (diff)
downloadgps-4c9c7839892c4272c30dcf3288bbe4d52649bced.tar.gz
Clean up compiler warning message
CRs-Fixed: 2070597 Change-Id: Ic57f5211a4e4b9112888435d54df7a361bcb6767
Diffstat (limited to 'location/LocationAPIClientBase.cpp')
-rw-r--r--location/LocationAPIClientBase.cpp13
1 files changed, 7 insertions, 6 deletions
diff --git a/location/LocationAPIClientBase.cpp b/location/LocationAPIClientBase.cpp
index d8eae3f..02bd3dd 100644
--- a/location/LocationAPIClientBase.cpp
+++ b/location/LocationAPIClientBase.cpp
@@ -30,6 +30,7 @@
#define LOG_TAG "LocSvc_APIClientBase"
#include <platform_lib_log_util.h>
+#include <inttypes.h>
#include <loc_cfg.h>
#include "LocationAPIClientBase.h"
@@ -598,7 +599,7 @@ void LocationAPIClientBase::locAPIRemoveGeofences(size_t count, uint32_t* ids)
if (mLocationAPI) {
uint32_t* sessions = (uint32_t*)malloc(sizeof(uint32_t) * count);
if (sessions == NULL) {
- LOC_LOGE("%s:%d] Failed to allocate %d bytes !",
+ LOC_LOGE("%s:%d] Failed to allocate %zu bytes !",
__FUNCTION__, __LINE__, sizeof(uint32_t) * count);
pthread_mutex_unlock(&mMutex);
return;
@@ -633,7 +634,7 @@ void LocationAPIClientBase::locAPIModifyGeofences(
if (mLocationAPI) {
uint32_t* sessions = (uint32_t*)malloc(sizeof(uint32_t) * count);
if (sessions == NULL) {
- LOC_LOGE("%s:%d] Failed to allocate %d bytes !",
+ LOC_LOGE("%s:%d] Failed to allocate %zu bytes !",
__FUNCTION__, __LINE__, sizeof(uint32_t) * count);
pthread_mutex_unlock(&mMutex);
return;
@@ -668,7 +669,7 @@ void LocationAPIClientBase::locAPIPauseGeofences(size_t count, uint32_t* ids)
if (mLocationAPI) {
uint32_t* sessions = (uint32_t*)malloc(sizeof(uint32_t) * count);
if (sessions == NULL) {
- LOC_LOGE("%s:%d] Failed to allocate %d bytes !",
+ LOC_LOGE("%s:%d] Failed to allocate %zu bytes !",
__FUNCTION__, __LINE__, sizeof(uint32_t) * count);
pthread_mutex_unlock(&mMutex);
return;
@@ -703,7 +704,7 @@ void LocationAPIClientBase::locAPIResumeGeofences(
if (mLocationAPI) {
uint32_t* sessions = (uint32_t*)malloc(sizeof(uint32_t) * count);
if (sessions == NULL) {
- LOC_LOGE("%s:%d] Failed to allocate %d bytes !",
+ LOC_LOGE("%s:%d] Failed to allocate %zu bytes !",
__FUNCTION__, __LINE__, sizeof(uint32_t) * count);
pthread_mutex_unlock(&mMutex);
return;
@@ -742,7 +743,7 @@ void LocationAPIClientBase::locAPIRemoveAllGeofences()
size_t count = sessionsVec.size();
uint32_t* sessions = (uint32_t*)malloc(sizeof(uint32_t) * count);
if (sessions == NULL) {
- LOC_LOGE("%s:%d] Failed to allocate %d bytes !",
+ LOC_LOGE("%s:%d] Failed to allocate %zu bytes !",
__FUNCTION__, __LINE__, sizeof(uint32_t) * count);
pthread_mutex_unlock(&mMutex);
return;
@@ -792,7 +793,7 @@ void LocationAPIClientBase::beforeGeofenceBreachCb(
geofenceBreachCallback genfenceCallback = nullptr;
if (ids == NULL) {
- LOC_LOGE("%s:%d] Failed to alloc %d bytes",
+ LOC_LOGE("%s:%d] Failed to alloc %zu bytes",
__FUNCTION__, __LINE__,
sizeof(uint32_t) * geofenceBreachNotification.count);
return;