From 76d06ce697bd95e586d07361b4a447ced5b851f1 Mon Sep 17 00:00:00 2001 From: Aleksander Morgado Date: Tue, 19 May 2020 13:15:42 +0200 Subject: [PATCH] cinterion,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. cinterion/mm-modem-helpers-cinterion.c: In function 'mm_cinterion_build_band': cinterion/mm-modem-helpers-cinterion.c:409:54: error: cast increases required alignment of target type [-Werror=cast-align] bands_string = mm_common_build_bands_string ((MMModemBand *)bands->data, bands->len); ^ --- plugins/cinterion/mm-modem-helpers-cinterion.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/cinterion/mm-modem-helpers-cinterion.c b/plugins/cinterion/mm-modem-helpers-cinterion.c index 5303a609..8ff21b66 100644 --- a/plugins/cinterion/mm-modem-helpers-cinterion.c +++ b/plugins/cinterion/mm-modem-helpers-cinterion.c @@ -406,7 +406,7 @@ mm_cinterion_build_band (GArray *bands, if (band == 0) { gchar *bands_string; - bands_string = mm_common_build_bands_string ((MMModemBand *)bands->data, bands->len); + bands_string = mm_common_build_bands_string ((MMModemBand *)(gpointer)bands->data, bands->len); g_set_error (error, MM_CORE_ERROR, MM_CORE_ERROR_FAILED,