The branch, master has been updated via f2e7f58 cmake: Fix cmocka >= 1.1.6 find_package() in CONFIG mode via dcbc2d4 tests: Fix pointer type for assert_string_equal() from 7403361 Bump version to 1.1.8
https://git.samba.org/?p=resolv_wrapper.git;a=shortlog;h=master - Log ----------------------------------------------------------------- commit f2e7f58025ecb4cf399494166abea01813b1d0f0 Author: Andreas Schneider <a...@samba.org> Date: Fri Feb 17 17:51:27 2023 +0100 cmake: Fix cmocka >= 1.1.6 find_package() in CONFIG mode Signed-off-by: Andreas Schneider <a...@samba.org> Reviewed-by: Pavel Filipenský <pfilipen...@samba.org> commit dcbc2d4c8f0648b0c1b78b2b43c3a28640dc3576 Author: Andreas Schneider <a...@samba.org> Date: Fri Feb 17 18:01:57 2023 +0100 tests: Fix pointer type for assert_string_equal() error: pointer targets in passing argument 1 of ‘_assert_string_equal’ differ in signedness [-Werror=pointer-sign] Signed-off-by: Andreas Schneider <a...@samba.org> Reviewed-by: Pavel Filipenský <pfilipen...@samba.org> ----------------------------------------------------------------------- Summary of changes: tests/CMakeLists.txt | 4 ++++ tests/test_dns_fake.c | 16 ++++++++-------- 2 files changed, 12 insertions(+), 8 deletions(-) Changeset truncated at 500 lines: diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt index 1262bed..7f2f4ee 100644 --- a/tests/CMakeLists.txt +++ b/tests/CMakeLists.txt @@ -1,5 +1,9 @@ project(tests C) +if (TARGET cmocka::cmocka) + set(CMOCKA_LIBRARY cmocka::cmocka) +endif() + set(TORTURE_LIBRARY torture) # A simple DNS server for testing diff --git a/tests/test_dns_fake.c b/tests/test_dns_fake.c index c057ebe..4f19f12 100644 --- a/tests/test_dns_fake.c +++ b/tests/test_dns_fake.c @@ -392,7 +392,7 @@ static void test_res_fake_uri_query(void **state) assert_int_equal(prio, 2); assert_int_equal(weight, 5); - assert_string_equal(rrdata, "https://vpn.cwrap.org/VPN"); + assert_string_equal((const char *)rrdata, "https://vpn.cwrap.org/VPN"); assert_int_equal(ns_parserr(&handle, ns_s_an, 1, &rr), 0); assert_int_equal(ns_rr_type(rr), ns_t_uri); @@ -402,7 +402,7 @@ static void test_res_fake_uri_query(void **state) assert_int_equal(prio, 2); assert_int_equal(weight, 10); - assert_string_equal(rrdata, "https://vpn2.cwrap.org/VPN"); + assert_string_equal((const char *)rrdata, "https://vpn2.cwrap.org/VPN"); assert_int_equal(ns_parserr(&handle, ns_s_an, 2, &rr), 0); assert_int_equal(ns_rr_type(rr), ns_t_uri); @@ -412,7 +412,7 @@ static void test_res_fake_uri_query(void **state) assert_int_equal(prio, 2); assert_int_equal(weight, 20); - assert_string_equal(rrdata, "https://vpn3.cwrap.org/VPN"); + assert_string_equal((const char *)rrdata, "https://vpn3.cwrap.org/VPN"); } @@ -461,7 +461,7 @@ static void test_res_fake_uri_query_minimal(void **state) assert_int_equal(prio, 1); assert_int_equal(weight, 100); - assert_string_equal(rrdata, "ftp://ftp.cwrap.org/public"); + assert_string_equal((const char *)rrdata, "ftp://ftp.cwrap.org/public"); } static void test_res_fake_soa_query(void **state) @@ -746,7 +746,7 @@ static void test_res_fake_txt_query(void **state) assert_int_equal(ns_rr_type(rr), ns_t_txt); rrdata = ns_rr_rdata(rr); - assert_string_equal(rrdata, "v=spf1 mx"); + assert_string_equal((const char *)rrdata, "v=spf1 mx"); } static void test_res_fake_uri_nsearch(void **state) @@ -787,7 +787,7 @@ static void test_res_fake_uri_nsearch(void **state) NS_GET16(weight, rrdata); assert_int_equal(prio, 2); assert_int_equal(weight, 5); - assert_string_equal(rrdata, "https://vpn.cwrap.org/VPN"); + assert_string_equal((const char *)rrdata, "https://vpn.cwrap.org/VPN"); assert_int_equal(ns_parserr(&handle, ns_s_an, 1, &rr), 0); assert_int_equal(ns_rr_type(rr), ns_t_uri); @@ -796,7 +796,7 @@ static void test_res_fake_uri_nsearch(void **state) NS_GET16(weight, rrdata); assert_int_equal(prio, 2); assert_int_equal(weight, 10); - assert_string_equal(rrdata, "https://vpn2.cwrap.org/VPN"); + assert_string_equal((const char *)rrdata, "https://vpn2.cwrap.org/VPN"); assert_int_equal(ns_parserr(&handle, ns_s_an, 2, &rr), 0); assert_int_equal(ns_rr_type(rr), ns_t_uri); @@ -805,7 +805,7 @@ static void test_res_fake_uri_nsearch(void **state) NS_GET16(weight, rrdata); assert_int_equal(prio, 2); assert_int_equal(weight, 20); - assert_string_equal(rrdata, "https://vpn3.cwrap.org/VPN"); + assert_string_equal((const char *)rrdata, "https://vpn3.cwrap.org/VPN"); } int main(void) -- Resolv Wrapper Repository