From 51ef497634aafc29f2c49cb665090adc40967a07 Mon Sep 17 00:00:00 2001 From: Aleksander Morgado Date: Mon, 23 Dec 2019 14:50:59 +0100 Subject: [PATCH] port-probe: fix warnings with -Wdiscarded-qualifiers MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit mm-port-probe.c:1091:7: error: initialization discards ‘const’ qualifier from pointer target type [-Werror=discarded-qualifiers] 1091 | { "AT", 3, mm_port_probe_response_processor_is_at }, | ^~~~ ... --- src/mm-port-probe.c | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/src/mm-port-probe.c b/src/mm-port-probe.c index 1700111f..f7708f31 100644 --- a/src/mm-port-probe.c +++ b/src/mm-port-probe.c @@ -1104,35 +1104,35 @@ serial_probe_at (MMPortProbe *self) } static const MMPortProbeAtCommand at_probing[] = { - { "AT", 3, mm_port_probe_response_processor_is_at }, - { "AT", 3, mm_port_probe_response_processor_is_at }, - { "AT", 3, mm_port_probe_response_processor_is_at }, + { (gchar *)"AT", 3, mm_port_probe_response_processor_is_at }, + { (gchar *)"AT", 3, mm_port_probe_response_processor_is_at }, + { (gchar *)"AT", 3, mm_port_probe_response_processor_is_at }, { NULL } }; static const MMPortProbeAtCommand vendor_probing[] = { - { "+CGMI", 3, mm_port_probe_response_processor_string }, - { "+GMI", 3, mm_port_probe_response_processor_string }, - { "I", 3, mm_port_probe_response_processor_string }, + { (gchar *)"+CGMI", 3, mm_port_probe_response_processor_string }, + { (gchar *)"+GMI", 3, mm_port_probe_response_processor_string }, + { (gchar *)"I", 3, mm_port_probe_response_processor_string }, { NULL } }; static const MMPortProbeAtCommand product_probing[] = { - { "+CGMM", 3, mm_port_probe_response_processor_string }, - { "+GMM", 3, mm_port_probe_response_processor_string }, - { "I", 3, mm_port_probe_response_processor_string }, + { (gchar *)"+CGMM", 3, mm_port_probe_response_processor_string }, + { (gchar *)"+GMM", 3, mm_port_probe_response_processor_string }, + { (gchar *)"I", 3, mm_port_probe_response_processor_string }, { NULL } }; static const MMPortProbeAtCommand icera_probing[] = { - { "%IPSYS?", 3, mm_port_probe_response_processor_string }, - { "%IPSYS?", 3, mm_port_probe_response_processor_string }, - { "%IPSYS?", 3, mm_port_probe_response_processor_string }, + { (gchar *)"%IPSYS?", 3, mm_port_probe_response_processor_string }, + { (gchar *)"%IPSYS?", 3, mm_port_probe_response_processor_string }, + { (gchar *)"%IPSYS?", 3, mm_port_probe_response_processor_string }, { NULL } }; static const MMPortProbeAtCommand xmm_probing[] = { - { "+XACT=?", 3, mm_port_probe_response_processor_string }, + { (gchar *)"+XACT=?", 3, mm_port_probe_response_processor_string }, { NULL } };