From 52e4a6744c119d312f3cb3831b450453c267112f Mon Sep 17 00:00:00 2001 From: Aleksander Morgado Date: Thu, 30 Jan 2020 18:05:45 +0100 Subject: [PATCH] cinterion,helpers: fix warnings with -Wdiscarded-qualifiers MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit CC cinterion/tests/test_modem_helpers_cinterion-test-modem-helpers-cinterion.o cinterion/tests/test-modem-helpers-cinterion.c: In function ‘test_slcc_urc_single’: cinterion/tests/test-modem-helpers-cinterion.c:749:64: error: initialization discards ‘const’ qualifier from pointer target type [-Werror=discarded-qualifiers] 749 | { 1, MM_CALL_DIRECTION_INCOMING, MM_CALL_STATE_ACTIVE, "123456789" } | ^~~~~~~~~~~ cinterion/tests/test-modem-helpers-cinterion.c: In function ‘test_slcc_urc_multiple’: cinterion/tests/test-modem-helpers-cinterion.c:764:65: error: initialization discards ‘const’ qualifier from pointer target type [-Werror=discarded-qualifiers] 764 | { 2, MM_CALL_DIRECTION_INCOMING, MM_CALL_STATE_ACTIVE, "123456789" }, | ^~~~~~~~~~~ cinterion/tests/test-modem-helpers-cinterion.c:765:65: error: initialization discards ‘const’ qualifier from pointer target type [-Werror=discarded-qualifiers] 765 | { 3, MM_CALL_DIRECTION_INCOMING, MM_CALL_STATE_ACTIVE, "987654321" }, | ^~~~~~~~~~~ cinterion/tests/test-modem-helpers-cinterion.c: In function ‘test_slcc_urc_complex’: cinterion/tests/test-modem-helpers-cinterion.c:781:65: error: initialization discards ‘const’ qualifier from pointer target type [-Werror=discarded-qualifiers] 781 | { 1, MM_CALL_DIRECTION_INCOMING, MM_CALL_STATE_ACTIVE, "123456789" }, | ^~~~~~~~~~~ cinterion/tests/test-modem-helpers-cinterion.c:782:65: error: initialization discards ‘const’ qualifier from pointer target type [-Werror=discarded-qualifiers] 782 | { 2, MM_CALL_DIRECTION_INCOMING, MM_CALL_STATE_WAITING, "987654321" }, | --- .../cinterion/tests/test-modem-helpers-cinterion.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/plugins/cinterion/tests/test-modem-helpers-cinterion.c b/plugins/cinterion/tests/test-modem-helpers-cinterion.c index 875cf74d..78adf30a 100644 --- a/plugins/cinterion/tests/test-modem-helpers-cinterion.c +++ b/plugins/cinterion/tests/test-modem-helpers-cinterion.c @@ -746,7 +746,7 @@ static void test_slcc_urc_single (void) { static const MMCallInfo expected_call_info_list[] = { - { 1, MM_CALL_DIRECTION_INCOMING, MM_CALL_STATE_ACTIVE, "123456789" } + { 1, MM_CALL_DIRECTION_INCOMING, MM_CALL_STATE_ACTIVE, (gchar *) "123456789" } }; const gchar *urc = @@ -760,9 +760,9 @@ static void test_slcc_urc_multiple (void) { static const MMCallInfo expected_call_info_list[] = { - { 1, MM_CALL_DIRECTION_INCOMING, MM_CALL_STATE_ACTIVE, NULL }, - { 2, MM_CALL_DIRECTION_INCOMING, MM_CALL_STATE_ACTIVE, "123456789" }, - { 3, MM_CALL_DIRECTION_INCOMING, MM_CALL_STATE_ACTIVE, "987654321" }, + { 1, MM_CALL_DIRECTION_INCOMING, MM_CALL_STATE_ACTIVE, NULL }, + { 2, MM_CALL_DIRECTION_INCOMING, MM_CALL_STATE_ACTIVE, (gchar *) "123456789" }, + { 3, MM_CALL_DIRECTION_INCOMING, MM_CALL_STATE_ACTIVE, (gchar *) "987654321" }, }; const gchar *urc = @@ -778,8 +778,8 @@ static void test_slcc_urc_complex (void) { static const MMCallInfo expected_call_info_list[] = { - { 1, MM_CALL_DIRECTION_INCOMING, MM_CALL_STATE_ACTIVE, "123456789" }, - { 2, MM_CALL_DIRECTION_INCOMING, MM_CALL_STATE_WAITING, "987654321" }, + { 1, MM_CALL_DIRECTION_INCOMING, MM_CALL_STATE_ACTIVE, (gchar *) "123456789" }, + { 2, MM_CALL_DIRECTION_INCOMING, MM_CALL_STATE_WAITING, (gchar *) "987654321" }, }; const gchar *urc =