From c1aac8ed2678c2ac7ae0333a3322b8990fe50527 Mon Sep 17 00:00:00 2001 From: Aleksander Morgado Date: Thu, 30 Jan 2020 18:50:31 +0100 Subject: [PATCH] altair: fix warnings with -Wdiscarded-qualifiers MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit altair/mm-plugin-altair-lte.c:44:7: error: initialization discards ‘const’ qualifier from pointer target type [-Werror=discarded-qualifiers] 44 | { "AT", 7, mm_port_probe_response_processor_is_at }, | ^~~~ altair/mm-plugin-altair-lte.c:45:7: error: initialization discards ‘const’ qualifier from pointer target type [-Werror=discarded-qualifiers] 45 | { "AT", 7, mm_port_probe_response_processor_is_at }, | ^~~~ altair/mm-plugin-altair-lte.c:46:7: error: initialization discards ‘const’ qualifier from pointer target type [-Werror=discarded-qualifiers] 46 | { "AT", 7, mm_port_probe_response_processor_is_at }, | ^~~~ altair/mm-broadband-modem-altair-lte.c:886:5: error: initialization discards ‘const’ qualifier from pointer target type [-Werror=discarded-qualifiers] 886 | { "%STATCM=1", 10, FALSE, response_processor_no_result_stop_on_error }, | ^~~~~~~~~~~ altair/mm-broadband-modem-altair-lte.c:887:5: error: initialization discards ‘const’ qualifier from pointer target type [-Werror=discarded-qualifiers] 887 | { "%NOTIFYEV=\"SIMREFRESH\",1", 10, FALSE, NULL }, | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~ altair/mm-broadband-modem-altair-lte.c:888:5: error: initialization discards ‘const’ qualifier from pointer target type [-Werror=discarded-qualifiers] 888 | { "%PCOINFO=1", 10, FALSE, NULL }, | ^~~~~~~~~~~~ ... --- plugins/altair/mm-broadband-modem-altair-lte.c | 12 ++++++------ plugins/altair/mm-plugin-altair-lte.c | 6 +++--- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/plugins/altair/mm-broadband-modem-altair-lte.c b/plugins/altair/mm-broadband-modem-altair-lte.c index 03912eae..669b7d2d 100644 --- a/plugins/altair/mm-broadband-modem-altair-lte.c +++ b/plugins/altair/mm-broadband-modem-altair-lte.c @@ -883,9 +883,9 @@ response_processor_no_result_stop_on_error (MMBaseModem *self, } static const MMBaseModemAtCommand unsolicited_events_enable_sequence[] = { - { "%STATCM=1", 10, FALSE, response_processor_no_result_stop_on_error }, - { "%NOTIFYEV=\"SIMREFRESH\",1", 10, FALSE, NULL }, - { "%PCOINFO=1", 10, FALSE, NULL }, + { (gchar *) "%STATCM=1", 10, FALSE, response_processor_no_result_stop_on_error }, + { (gchar *) "%NOTIFYEV=\"SIMREFRESH\",1", 10, FALSE, NULL }, + { (gchar *) "%PCOINFO=1", 10, FALSE, NULL }, { NULL } }; @@ -955,9 +955,9 @@ modem_3gpp_enable_unsolicited_events (MMIfaceModem3gpp *self, /* Disabling unsolicited events (3GPP interface) */ static const MMBaseModemAtCommand unsolicited_events_disable_sequence[] = { - { "%STATCM=0", 10, FALSE, NULL }, - { "%NOTIFYEV=\"SIMREFRESH\",0", 10, FALSE, NULL }, - { "%PCOINFO=0", 10, FALSE, NULL }, + { (gchar *) "%STATCM=0", 10, FALSE, NULL }, + { (gchar *) "%NOTIFYEV=\"SIMREFRESH\",0", 10, FALSE, NULL }, + { (gchar *) "%PCOINFO=0", 10, FALSE, NULL }, { NULL } }; diff --git a/plugins/altair/mm-plugin-altair-lte.c b/plugins/altair/mm-plugin-altair-lte.c index 7f6a7c0b..f83ce33c 100644 --- a/plugins/altair/mm-plugin-altair-lte.c +++ b/plugins/altair/mm-plugin-altair-lte.c @@ -41,9 +41,9 @@ MM_PLUGIN_DEFINE_MINOR_VERSION take longer to respond after a reset. */ static const MMPortProbeAtCommand custom_at_probe[] = { - { "AT", 7, mm_port_probe_response_processor_is_at }, - { "AT", 7, mm_port_probe_response_processor_is_at }, - { "AT", 7, mm_port_probe_response_processor_is_at }, + { (gchar *) "AT", 7, mm_port_probe_response_processor_is_at }, + { (gchar *) "AT", 7, mm_port_probe_response_processor_is_at }, + { (gchar *) "AT", 7, mm_port_probe_response_processor_is_at }, { NULL } };