diff options
author | Aleksander Morgado <aleksander@aleksander.es> | 2020-01-31 14:30:23 +0100 |
---|---|---|
committer | Aleksander Morgado <aleksander@aleksander.es> | 2020-01-31 15:18:35 +0100 |
commit | 11f04851cefe6553d2f12ad7ec6fdef892f7275a (patch) | |
tree | 2ac0933ad2874890fcb9c8ea54fb7c408e0fd6e9 /libmm-glib/mm-location-gps-nmea.c | |
parent | 02eafb582186021a7eab2863c88f3275b68c8f5e (diff) |
libmm-glib,location-gps-nmea: avoid using deprecated build_full() method
mm-location-gps-nmea.c: In function ‘mm_location_gps_nmea_get_string_variant’:
mm-location-gps-nmea.c:245:5: warning: ‘mm_location_gps_nmea_build_full’ is deprecated: Use 'mm_location_gps_nmea_get_traces' instead [-Wdeprecated-declarations]
245 | built = mm_location_gps_nmea_build_full (self);
| ^~~~~
Diffstat (limited to 'libmm-glib/mm-location-gps-nmea.c')
-rw-r--r-- | libmm-glib/mm-location-gps-nmea.c | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/libmm-glib/mm-location-gps-nmea.c b/libmm-glib/mm-location-gps-nmea.c index 6b6b95c4..ada073f2 100644 --- a/libmm-glib/mm-location-gps-nmea.c +++ b/libmm-glib/mm-location-gps-nmea.c @@ -237,16 +237,14 @@ mm_location_gps_nmea_build_full (MMLocationGpsNmea *self) GVariant * mm_location_gps_nmea_get_string_variant (MMLocationGpsNmea *self) { - GVariant *variant = NULL; - gchar *built; + g_autofree gchar *built = NULL; + g_auto (GStrv) traces = NULL; g_return_val_if_fail (MM_IS_LOCATION_GPS_NMEA (self), NULL); - built = mm_location_gps_nmea_build_full (self); - variant = g_variant_new_string (built); - g_free (built); - - return variant; + traces = mm_location_gps_nmea_get_traces (self); + built = g_strjoinv ("\r\n", traces); + return g_variant_new_string (built); } /*****************************************************************************/ |