From 7e004b7c50204218928e5c615ba27c2c3dfe8e20 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pavel=20B=C5=99ezina?= Date: Fri, 24 Jul 2020 13:27:35 +0200 Subject: [PATCH] tests: discard const in test_confdb_get_enabled_domain_list MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ``` ../../src/tests/cmocka/confdb/test_confdb.c:247:51: error: passing argument 2 of ‘string_in_list’ from incompatible pointer type [-Werror=incompatible-pointer-types] 247 | assert_true(string_in_list(result[index], expected_enabled_domain_list, false)); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~ | | | const char ** ``` --- src/tests/cmocka/confdb/test_confdb.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/tests/cmocka/confdb/test_confdb.c b/src/tests/cmocka/confdb/test_confdb.c index 522e864f598..daff41e5cc8 100644 --- a/src/tests/cmocka/confdb/test_confdb.c +++ b/src/tests/cmocka/confdb/test_confdb.c @@ -244,7 +244,7 @@ static void test_confdb_get_enabled_domain_list(void **state) assert_true(string_in_list(expected_enabled_domain_list[index], result, false)); } for (int index = 0; result[index]; index++) { - assert_true(string_in_list(result[index], expected_enabled_domain_list, false)); + assert_true(string_in_list(result[index], discard_const(expected_enabled_domain_list), false)); } TALLOC_FREE(tmp_ctx);