aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAleksander Morgado <aleksander@aleksander.es>2020-05-19 13:15:42 +0200
committerAleksander Morgado <aleksander@aleksander.es>2020-05-19 13:44:23 +0200
commit76d06ce697bd95e586d07361b4a447ced5b851f1 (patch)
tree9f00fd23a686fb6ca07615c0a78bc53c85e78d3a
parentb0be4e895cc2b3b9f533b513eb4da3be99718497 (diff)
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); ^
-rw-r--r--plugins/cinterion/mm-modem-helpers-cinterion.c2
1 files changed, 1 insertions, 1 deletions
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,