From ccf16e00a73291899af4631557c90e4e697f9841 Mon Sep 17 00:00:00 2001 From: Aleksander Morgado Date: Tue, 19 May 2020 13:16:51 +0200 Subject: [PATCH] ublox,helpers: avoid cast-align errors We can safely cast the data in a GArray to gpointer first, and then to the pointer type we require. ublox/mm-modem-helpers-ublox.c: In function 'parse_bands_from_string': ublox/mm-modem-helpers-ublox.c:1612:48: error: cast increases required alignment of target type [-Werror=cast-align] tmpstr = mm_common_build_bands_string ((MMModemBand *)(bands->data), bands->len); ^ --- plugins/ublox/mm-modem-helpers-ublox.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/ublox/mm-modem-helpers-ublox.c b/plugins/ublox/mm-modem-helpers-ublox.c index fe1719c3..ca3039a6 100644 --- a/plugins/ublox/mm-modem-helpers-ublox.c +++ b/plugins/ublox/mm-modem-helpers-ublox.c @@ -1609,7 +1609,7 @@ parse_bands_from_string (const gchar *str, gchar *tmpstr; bands = uact_num_array_to_band_array (nums); - tmpstr = mm_common_build_bands_string ((MMModemBand *)(bands->data), bands->len); + tmpstr = mm_common_build_bands_string ((MMModemBand *)(gpointer)(bands->data), bands->len); mm_obj_dbg (log_object, "modem reports support for %s bands: %s", group, tmpstr); g_free (tmpstr);