diff options
author | Aleksander Morgado <aleksander@aleksander.es> | 2020-05-19 13:03:26 +0200 |
---|---|---|
committer | Aleksander Morgado <aleksander@aleksander.es> | 2020-05-19 13:44:23 +0200 |
commit | ffbbec4a0d9a8a19f66b986db6534a10c3f973b4 (patch) | |
tree | c5af98ae904e1ba6844c031b9ac50f6eee726271 /src/mm-iface-modem-location.c | |
parent | 7ccec0bd71a0451ad9e6c5f9ec63e47fbead8a27 (diff) |
iface-modem-location: avoid warnings with -Wsign-compare
mm-iface-modem-location.c: In function 'location_gps_update_nmea':
mm-iface-modem-location.c:272:61: error: comparison between signed and unsigned integer expressions [-Werror=sign-compare]
time (NULL) - ctx->location_gps_nmea_last_time >= mm_gdbus_modem_location_get_gps_refresh_rate (skeleton))) {
^~
mm-iface-modem-location.c:282:60: error: comparison between signed and unsigned integer expressions [-Werror=sign-compare]
time (NULL) - ctx->location_gps_raw_last_time >= mm_gdbus_modem_location_get_gps_refresh_rate (skeleton))) {
^~
Diffstat (limited to 'src/mm-iface-modem-location.c')
-rw-r--r-- | src/mm-iface-modem-location.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/mm-iface-modem-location.c b/src/mm-iface-modem-location.c index f40f48ab..ce307ccb 100644 --- a/src/mm-iface-modem-location.c +++ b/src/mm-iface-modem-location.c @@ -269,7 +269,7 @@ location_gps_update_nmea (MMIfaceModemLocation *self, g_assert (ctx->location_gps_nmea != NULL); if (mm_location_gps_nmea_add_trace (ctx->location_gps_nmea, nmea_trace) && (ctx->location_gps_nmea_last_time == 0 || - time (NULL) - ctx->location_gps_nmea_last_time >= mm_gdbus_modem_location_get_gps_refresh_rate (skeleton))) { + time (NULL) - ctx->location_gps_nmea_last_time >= (glong)mm_gdbus_modem_location_get_gps_refresh_rate (skeleton))) { ctx->location_gps_nmea_last_time = time (NULL); update_nmea = TRUE; } @@ -279,7 +279,7 @@ location_gps_update_nmea (MMIfaceModemLocation *self, g_assert (ctx->location_gps_raw != NULL); if (mm_location_gps_raw_add_trace (ctx->location_gps_raw, nmea_trace) && (ctx->location_gps_raw_last_time == 0 || - time (NULL) - ctx->location_gps_raw_last_time >= mm_gdbus_modem_location_get_gps_refresh_rate (skeleton))) { + time (NULL) - ctx->location_gps_raw_last_time >= (glong)mm_gdbus_modem_location_get_gps_refresh_rate (skeleton))) { ctx->location_gps_raw_last_time = time (NULL); update_raw = TRUE; } |