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))) {
                                                              ^~
This commit is contained in:
Aleksander Morgado
2020-05-19 13:03:26 +02:00
parent 7ccec0bd71
commit ffbbec4a0d

View File

@@ -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;
}