From 7af58f34508f7a71ca1ba072ac6c828db86a1e08 Mon Sep 17 00:00:00 2001 From: Aleksander Morgado Date: Thu, 30 Jan 2020 18:21:32 +0100 Subject: [PATCH] icera: fix warnings with -Wdiscarded-qualifiers MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit CC icera/libmm_shared_icera_la-mm-broadband-modem-icera.lo icera/mm-broadband-modem-icera.c:1082:30: error: initialization discards ‘const’ qualifier from pointer target type [-Werror=discarded-qualifiers] 1082 | { MM_MODEM_BAND_UTRAN_1, "FDD_BAND_I", FALSE }, | ^~~~~~~~~~~~ icera/mm-broadband-modem-icera.c:1083:30: error: initialization discards ‘const’ qualifier from pointer target type [-Werror=discarded-qualifiers] 1083 | { MM_MODEM_BAND_UTRAN_2, "FDD_BAND_II", FALSE }, | ^~~~~~~~~~~~~ icera/mm-broadband-modem-icera.c:1084:30: error: initialization discards ‘const’ qualifier from pointer target type [-Werror=discarded-qualifiers] 1084 | { MM_MODEM_BAND_UTRAN_3, "FDD_BAND_III", FALSE }, | ^~~~~~~~~~~~~~ icera/mm-broadband-modem-icera.c:1085:30: error: initialization discards ‘const’ qualifier from pointer target type [-Werror=discarded-qualifiers] 1085 | { MM_MODEM_BAND_UTRAN_4, "FDD_BAND_IV", FALSE }, | ^~~~~~~~~~~~~ icera/mm-broadband-modem-icera.c:1086:30: error: initialization discards ‘const’ qualifier from pointer target type [-Werror=discarded-qualifiers] 1086 | { MM_MODEM_BAND_UTRAN_5, "FDD_BAND_V", FALSE }, | ^~~~~~~~~~~~ --- plugins/icera/mm-broadband-modem-icera.c | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/plugins/icera/mm-broadband-modem-icera.c b/plugins/icera/mm-broadband-modem-icera.c index 626340bb..add2d1c1 100644 --- a/plugins/icera/mm-broadband-modem-icera.c +++ b/plugins/icera/mm-broadband-modem-icera.c @@ -1079,20 +1079,20 @@ band_free (Band *b) static const Band modem_bands[] = { /* Sort 3G first since it's preferred */ - { MM_MODEM_BAND_UTRAN_1, "FDD_BAND_I", FALSE }, - { MM_MODEM_BAND_UTRAN_2, "FDD_BAND_II", FALSE }, - { MM_MODEM_BAND_UTRAN_3, "FDD_BAND_III", FALSE }, - { MM_MODEM_BAND_UTRAN_4, "FDD_BAND_IV", FALSE }, - { MM_MODEM_BAND_UTRAN_5, "FDD_BAND_V", FALSE }, - { MM_MODEM_BAND_UTRAN_6, "FDD_BAND_VI", FALSE }, - { MM_MODEM_BAND_UTRAN_8, "FDD_BAND_VIII", FALSE }, + { MM_MODEM_BAND_UTRAN_1, (gchar *) "FDD_BAND_I", FALSE }, + { MM_MODEM_BAND_UTRAN_2, (gchar *) "FDD_BAND_II", FALSE }, + { MM_MODEM_BAND_UTRAN_3, (gchar *) "FDD_BAND_III", FALSE }, + { MM_MODEM_BAND_UTRAN_4, (gchar *) "FDD_BAND_IV", FALSE }, + { MM_MODEM_BAND_UTRAN_5, (gchar *) "FDD_BAND_V", FALSE }, + { MM_MODEM_BAND_UTRAN_6, (gchar *) "FDD_BAND_VI", FALSE }, + { MM_MODEM_BAND_UTRAN_8, (gchar *) "FDD_BAND_VIII", FALSE }, /* 2G second */ - { MM_MODEM_BAND_G850, "G850", FALSE }, - { MM_MODEM_BAND_DCS, "DCS", FALSE }, - { MM_MODEM_BAND_EGSM, "EGSM", FALSE }, - { MM_MODEM_BAND_PCS, "PCS", FALSE }, + { MM_MODEM_BAND_G850, (gchar *) "G850", FALSE }, + { MM_MODEM_BAND_DCS, (gchar *) "DCS", FALSE }, + { MM_MODEM_BAND_EGSM, (gchar *) "EGSM", FALSE }, + { MM_MODEM_BAND_PCS, (gchar *) "PCS", FALSE }, /* And ANY last since it's most inclusive */ - { MM_MODEM_BAND_ANY, "ANY", FALSE }, + { MM_MODEM_BAND_ANY, (gchar *) "ANY", FALSE }, }; static const guint modem_band_any_bit = 1 << (G_N_ELEMENTS (modem_bands) - 1);