From 50e6ead7e26c37824b0493acc3aef8def119f903 Mon Sep 17 00:00:00 2001 From: Aleksander Morgado Date: Fri, 31 Jan 2020 07:51:40 +0100 Subject: [PATCH] huawei: fix warnings with -Wdiscarded-qualifiers MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit huawei/mm-broadband-modem-huawei.c: At top level: huawei/mm-broadband-modem-huawei.c:2011:7: error: initialization discards ‘const’ qualifier from pointer target type [-Werror=discarded-qualifiers] 2011 | { "^PORTSEL=0", 5, FALSE, NULL }, | ^~~~~~~~~~~~ huawei/mm-broadband-modem-huawei.c:2012:7: error: initialization discards ‘const’ qualifier from pointer target type [-Werror=discarded-qualifiers] 2012 | { "^CURC=1", 3, FALSE, NULL }, | ^~~~~~~~~ --- plugins/huawei/mm-broadband-modem-huawei.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/plugins/huawei/mm-broadband-modem-huawei.c b/plugins/huawei/mm-broadband-modem-huawei.c index 1fbd3d2b..2c958e47 100644 --- a/plugins/huawei/mm-broadband-modem-huawei.c +++ b/plugins/huawei/mm-broadband-modem-huawei.c @@ -2013,8 +2013,8 @@ own_enable_unsolicited_events_ready (MMBaseModem *self, static const MMBaseModemAtCommand unsolicited_enable_sequence[] = { /* With ^PORTSEL we specify whether we want the PCUI port (0) or the * modem port (1) to receive the unsolicited messages */ - { "^PORTSEL=0", 5, FALSE, NULL }, - { "^CURC=1", 3, FALSE, NULL }, + { (gchar *) "^PORTSEL=0", 5, FALSE, NULL }, + { (gchar *) "^CURC=1", 3, FALSE, NULL }, { NULL } }; @@ -3362,7 +3362,7 @@ own_voice_enable_unsolicited_events_ready (MMBaseModem *self, static const MMBaseModemAtCommand unsolicited_voice_enable_sequence[] = { /* With ^DDTMFCFG we active the DTMF Decoder */ - { "^DDTMFCFG=0,1", 3, FALSE, NULL }, + { (gchar *) "^DDTMFCFG=0,1", 3, FALSE, NULL }, { NULL } }; @@ -3435,7 +3435,7 @@ own_voice_disable_unsolicited_events_ready (MMBaseModem *self, static const MMBaseModemAtCommand unsolicited_voice_disable_sequence[] = { /* With ^DDTMFCFG we deactivate the DTMF Decoder */ - { "^DDTMFCFG=1,0", 3, FALSE, NULL }, + { (gchar *) "^DDTMFCFG=1,0", 3, FALSE, NULL }, { NULL } }; @@ -3997,7 +3997,7 @@ enable_location_gathering_finish (MMIfaceModemLocation *self, return g_task_propagate_boolean (G_TASK (res), error); } -static char *gps_startup[] = { +static const gchar *gps_startup[] = { "^WPDOM=0", "^WPDST=1", "^WPDFR=65535,30", @@ -4186,8 +4186,8 @@ modem_check_time_reply (MMBaseModem *_self, } static const MMBaseModemAtCommand time_cmd_sequence[] = { - { "^NTCT?", 3, FALSE, modem_check_time_reply }, /* 3GPP/LTE */ - { "^TIME", 3, FALSE, modem_check_time_reply }, /* CDMA */ + { (gchar *) "^NTCT?", 3, FALSE, modem_check_time_reply }, /* 3GPP/LTE */ + { (gchar *) "^TIME", 3, FALSE, modem_check_time_reply }, /* CDMA */ { NULL } };