Clean up compiler warning message
CRs-Fixed: 2070597
Change-Id: Ic57f5211a4e4b9112888435d54df7a361bcb6767
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 @@
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 @@
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 @@
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 @@
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 @@
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 @@
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;