diff options
author | Aleksander Morgado <aleksander@aleksander.es> | 2020-05-19 13:17:50 +0200 |
---|---|---|
committer | Aleksander Morgado <aleksander@aleksander.es> | 2020-05-19 13:44:23 +0200 |
commit | 175bedf920159f75b2d517fd638835569477aa55 (patch) | |
tree | a01ebe5f829344b8d1ed300073c5cd52d90b6795 | |
parent | ccf16e00a73291899af4631557c90e4e697f9841 (diff) |
xmm: avoid cast-align errors
We can safely cast the data in a GArray to gpointer first, and then
to the pointer type we require.
xmm/mm-shared-xmm.c: In function 'validate_and_build_command_set_current_bands':
xmm/mm-shared-xmm.c:512:45: error: cast increases required alignment of target type [-Werror=cast-align]
str = mm_common_build_bands_string ((const MMModemBand *)unapplied_bands->data, unapplied_bands->len);
^
-rw-r--r-- | plugins/xmm/mm-shared-xmm.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/plugins/xmm/mm-shared-xmm.c b/plugins/xmm/mm-shared-xmm.c index 60457589..746aff36 100644 --- a/plugins/xmm/mm-shared-xmm.c +++ b/plugins/xmm/mm-shared-xmm.c @@ -509,7 +509,7 @@ validate_and_build_command_set_current_bands (MMSharedXmm *self, if (unapplied_bands->len > 0) { gchar *str; - str = mm_common_build_bands_string ((const MMModemBand *)unapplied_bands->data, unapplied_bands->len); + str = mm_common_build_bands_string ((const MMModemBand *)(gconstpointer)unapplied_bands->data, unapplied_bands->len); inner_error = g_error_new (MM_CORE_ERROR, MM_CORE_ERROR_INVALID_ARGS, "Cannot update bands for modes not currently allowed: %s", str); g_free (str); |