summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--android/2.0/GnssConfiguration.cpp2
-rw-r--r--android/2.0/location_api/GeofenceAPIClient.cpp2
-rw-r--r--android/2.0/location_api/GnssAPIClient.cpp6
-rw-r--r--android/2.0/location_api/MeasurementAPIClient.cpp2
-rw-r--r--build/target_specific_features.mk1
-rw-r--r--core/LocApiBase.cpp2
-rw-r--r--pla/Android.mk1
-rw-r--r--utils/LocIpc.cpp4
-rw-r--r--utils/LocIpc.h2
9 files changed, 10 insertions, 12 deletions
diff --git a/android/2.0/GnssConfiguration.cpp b/android/2.0/GnssConfiguration.cpp
index 671b6e7..d2a8763 100644
--- a/android/2.0/GnssConfiguration.cpp
+++ b/android/2.0/GnssConfiguration.cpp
@@ -255,7 +255,7 @@ bool GnssConfiguration::setBlacklistedSource(
break;
default:
copyToSource.constellation = GNSS_SV_TYPE_UNKNOWN;
- LOC_LOGe("Invalid constellation %u", copyFromSource.constellation);
+ LOC_LOGe("Invalid constellation %hhu", copyFromSource.constellation);
retVal = false;
break;
}
diff --git a/android/2.0/location_api/GeofenceAPIClient.cpp b/android/2.0/location_api/GeofenceAPIClient.cpp
index fabf8bb..a93c988 100644
--- a/android/2.0/location_api/GeofenceAPIClient.cpp
+++ b/android/2.0/location_api/GeofenceAPIClient.cpp
@@ -141,7 +141,7 @@ void GeofenceAPIClient::geofenceRemoveAll()
// callbacks
void GeofenceAPIClient::onGeofenceBreachCb(GeofenceBreachNotification geofenceBreachNotification)
{
- LOC_LOGD("%s]: (%zu)", __FUNCTION__, geofenceBreachNotification.count);
+ LOC_LOGD("%s]: (%d)", __FUNCTION__, geofenceBreachNotification.count);
if (mGnssGeofencingCbIface != nullptr) {
for (size_t i = 0; i < geofenceBreachNotification.count; i++) {
GnssLocation gnssLocation;
diff --git a/android/2.0/location_api/GnssAPIClient.cpp b/android/2.0/location_api/GnssAPIClient.cpp
index 68cf395..15245e3 100644
--- a/android/2.0/location_api/GnssAPIClient.cpp
+++ b/android/2.0/location_api/GnssAPIClient.cpp
@@ -517,7 +517,7 @@ void GnssAPIClient::onGnssNiCb(uint32_t id, GnssNiNotification gnssNiNotificatio
void GnssAPIClient::onGnssSvCb(GnssSvNotification gnssSvNotification)
{
- LOC_LOGD("%s]: (count: %zu)", __FUNCTION__, gnssSvNotification.count);
+ LOC_LOGD("%s]: (count: %u)", __FUNCTION__, gnssSvNotification.count);
mMutex.lock();
auto gnssCbIface(mGnssCbIface);
auto gnssCbIface_2_0(mGnssCbIface_2_0);
@@ -561,7 +561,7 @@ void GnssAPIClient::onGnssNmeaCb(GnssNmeaNotification gnssNmeaNotification)
auto r = gnssCbIface_2_0->gnssNmeaCb(
static_cast<V1_0::GnssUtcTime>(gnssNmeaNotification.timestamp), nmeaString);
if (!r.isOk()) {
- LOC_LOGE("%s] Error from gnssCbIface_2_0 nmea=%s length=%zu description=%s",
+ LOC_LOGE("%s] Error from gnssCbIface_2_0 nmea=%s length=%u description=%s",
__func__, gnssNmeaNotification.nmea, gnssNmeaNotification.length,
r.description().c_str());
}
@@ -569,7 +569,7 @@ void GnssAPIClient::onGnssNmeaCb(GnssNmeaNotification gnssNmeaNotification)
auto r = gnssCbIface->gnssNmeaCb(
static_cast<V1_0::GnssUtcTime>(gnssNmeaNotification.timestamp), nmeaString);
if (!r.isOk()) {
- LOC_LOGE("%s] Error from gnssNmeaCb nmea=%s length=%zu description=%s",
+ LOC_LOGE("%s] Error from gnssNmeaCb nmea=%s length=%u description=%s",
__func__, gnssNmeaNotification.nmea, gnssNmeaNotification.length,
r.description().c_str());
}
diff --git a/android/2.0/location_api/MeasurementAPIClient.cpp b/android/2.0/location_api/MeasurementAPIClient.cpp
index 23c3b16..eb0c7d1 100644
--- a/android/2.0/location_api/MeasurementAPIClient.cpp
+++ b/android/2.0/location_api/MeasurementAPIClient.cpp
@@ -170,7 +170,7 @@ void MeasurementAPIClient::measurementClose() {
void MeasurementAPIClient::onGnssMeasurementsCb(
GnssMeasurementsNotification gnssMeasurementsNotification)
{
- LOC_LOGD("%s]: (count: %zu active: %d)",
+ LOC_LOGD("%s]: (count: %u active: %d)",
__FUNCTION__, gnssMeasurementsNotification.count, mTracking);
if (mTracking) {
mMutex.lock();
diff --git a/build/target_specific_features.mk b/build/target_specific_features.mk
index ad7f7e1..ca6eb79 100644
--- a/build/target_specific_features.mk
+++ b/build/target_specific_features.mk
@@ -1,7 +1,6 @@
GNSS_CFLAGS := \
-Werror \
-Wno-error=unused-parameter \
- -Wno-error=format \
-Wno-error=macro-redefined \
-Wno-error=reorder \
-Wno-error=missing-braces \
diff --git a/core/LocApiBase.cpp b/core/LocApiBase.cpp
index c172376..a521ceb 100644
--- a/core/LocApiBase.cpp
+++ b/core/LocApiBase.cpp
@@ -404,7 +404,7 @@ void LocApiBase::reportSv(GnssSvNotification& svNotify)
"QZSS", "BEIDOU", "GALILEO" };
// print the SV info before delivering
- LOC_LOGV("num sv: %zu\n"
+ LOC_LOGV("num sv: %u\n"
" sv: constellation svid cN0"
" elevation azimuth flags",
svNotify.count);
diff --git a/pla/Android.mk b/pla/Android.mk
index ce062bb..a57861d 100644
--- a/pla/Android.mk
+++ b/pla/Android.mk
@@ -1,7 +1,6 @@
GNSS_CFLAGS := \
-Werror \
-Wno-error=unused-parameter \
- -Wno-error=format \
-Wno-error=macro-redefined \
-Wno-error=reorder \
-Wno-error=missing-braces \
diff --git a/utils/LocIpc.cpp b/utils/LocIpc.cpp
index ecaff01..9496895 100644
--- a/utils/LocIpc.cpp
+++ b/utils/LocIpc.cpp
@@ -48,7 +48,7 @@ namespace loc_util {
#define SOCK_OP_AND_LOG(buf, length, opable, rtv, exe) \
if (nullptr == (buf) || 0 == (length)) { \
- LOC_LOGe("Invalid inputs: buf - %p, length - %d", (buf), (length)); \
+ LOC_LOGe("Invalid inputs: buf - %p, length - %u", (buf), (length)); \
} else if (!(opable)) { \
LOC_LOGe("Invalid object: operable - %d", (opable)); \
} else { \
@@ -60,7 +60,7 @@ namespace loc_util {
const char Sock::MSG_ABORT[] = "LocIpc::Sock::ABORT";
const char Sock::LOC_IPC_HEAD[] = "$MSGLEN$";
-ssize_t Sock::send(const void *buf, size_t len, int flags, const struct sockaddr *destAddr,
+ssize_t Sock::send(const void *buf, uint32_t len, int flags, const struct sockaddr *destAddr,
socklen_t addrlen) const {
ssize_t rtv = -1;
SOCK_OP_AND_LOG(buf, len, isValid(), rtv, sendto(buf, len, flags, destAddr, addrlen));
diff --git a/utils/LocIpc.h b/utils/LocIpc.h
index 20a1c8f..c71c4e0 100644
--- a/utils/LocIpc.h
+++ b/utils/LocIpc.h
@@ -164,7 +164,7 @@ public:
inline Sock(int sid, const uint32_t maxTxSize = 8192) : mMaxTxSize(maxTxSize), mSid(sid) {}
inline ~Sock() { close(); }
inline bool isValid() const { return -1 != mSid; }
- ssize_t send(const void *buf, size_t len, int flags, const struct sockaddr *destAddr,
+ ssize_t send(const void *buf, uint32_t len, int flags, const struct sockaddr *destAddr,
socklen_t addrlen) const;
ssize_t recv(const shared_ptr<ILocIpcListener>& dataCb, int flags, struct sockaddr *srcAddr,
socklen_t *addrlen, int sid = -1) const;