bind9/tests/isc
Michał Kępień b2b3899af7
Fix cmocka-related compiler warnings in ht_test
tests/isc/ht_test.c triggers the following compiler warnings when built
against development versions of cmocka:

    In file included from ht_test.c:24:
    ht_test.c: In function ‘test_ht_full’:
    ht_test.c:69:45: warning: passing argument 2 of ‘_assert_ptr_equal’ makes pointer from integer without a cast [-Wint-conversion]
       69 |                 assert_ptr_equal((void *)i, (uintptr_t)f);
    /usr/include/cmocka.h:1513:56: note: in definition of macro ‘assert_ptr_equal’
     1513 | #define assert_ptr_equal(a, b) _assert_ptr_equal((a), (b), __FILE__, __LINE__)
          |                                                        ^
    /usr/include/cmocka.h:2907:36: note: expected ‘const void *’ but argument is of type ‘long unsigned int’
     2907 |                        const void *b,
          |                        ~~~~~~~~~~~~^
    ht_test.c:164:45: warning: passing argument 2 of ‘_assert_ptr_equal’ makes pointer from integer without a cast [-Wint-conversion]
      164 |                 assert_ptr_equal((void *)i, (uintptr_t)f);
    /usr/include/cmocka.h:1513:56: note: in definition of macro ‘assert_ptr_equal’
     1513 | #define assert_ptr_equal(a, b) _assert_ptr_equal((a), (b), __FILE__, __LINE__)
          |                                                        ^
    /usr/include/cmocka.h:2907:36: note: expected ‘const void *’ but argument is of type ‘long unsigned int’
     2907 |                        const void *b,
          |                        ~~~~~~~~~~~~^

These are caused by a change to the definitions of pointer assert
functions in cmocka's development branch [1].  Fix by casting the
affected variables to (void *) instead of (uintptr_t).

[1] https://git.cryptomilk.org/projects/cmocka.git/commit/?id=09621179af67535788a67957a910d9f17c975b45

(cherry picked from commit 8d36e68c7a)
2023-05-18 15:36:03 +02:00
..
testdata/file Move all the unit tests to /tests/<libname>/ 2022-05-31 12:06:00 +02:00
aes_test.c Include <inttypes.h> whenever including <cmocka.h> 2023-05-18 15:36:03 +02:00
buffer_test.c Include <inttypes.h> whenever including <cmocka.h> 2023-05-18 15:36:03 +02:00
counter_test.c Include <inttypes.h> whenever including <cmocka.h> 2023-05-18 15:36:03 +02:00
crc64_test.c Include <inttypes.h> whenever including <cmocka.h> 2023-05-18 15:36:03 +02:00
doh_test.c unit tests: include an OpenSSL header before including cmocka.h 2023-04-14 12:40:14 +00:00
errno_test.c Include <inttypes.h> whenever including <cmocka.h> 2023-05-18 15:36:03 +02:00
file_test.c Include <inttypes.h> whenever including <cmocka.h> 2023-05-18 15:36:03 +02:00
hash_test.c Move all the unit tests to /tests/<libname>/ 2022-05-31 12:06:00 +02:00
heap_test.c Include <inttypes.h> whenever including <cmocka.h> 2023-05-18 15:36:03 +02:00
hmac_test.c Include <inttypes.h> whenever including <cmocka.h> 2023-05-18 15:36:03 +02:00
ht_test.c Fix cmocka-related compiler warnings in ht_test 2023-05-18 15:36:03 +02:00
lex_test.c Include <inttypes.h> whenever including <cmocka.h> 2023-05-18 15:36:03 +02:00
Makefile.am Add tests/isc/uv_wrap.h to Makefile.am 2022-06-01 17:45:34 +02:00
md_test.c Include <inttypes.h> whenever including <cmocka.h> 2023-05-18 15:36:03 +02:00
mem_test.c Move all the unit tests to /tests/<libname>/ 2022-05-31 12:06:00 +02:00
netaddr_test.c Include <inttypes.h> whenever including <cmocka.h> 2023-05-18 15:36:03 +02:00
netmgr_test.c Include <inttypes.h> whenever including <cmocka.h> 2023-05-18 15:36:03 +02:00
parse_test.c Move all the unit tests to /tests/<libname>/ 2022-05-31 12:06:00 +02:00
pool_test.c Include <inttypes.h> whenever including <cmocka.h> 2023-05-18 15:36:03 +02:00
quota_test.c Include <inttypes.h> whenever including <cmocka.h> 2023-05-18 15:36:03 +02:00
radix_test.c Include <inttypes.h> whenever including <cmocka.h> 2023-05-18 15:36:03 +02:00
random_test.c Update sources to Clang 15 formatting 2022-11-29 09:14:07 +01:00
regex_test.c Include <inttypes.h> whenever including <cmocka.h> 2023-05-18 15:36:03 +02:00
result_test.c Include <inttypes.h> whenever including <cmocka.h> 2023-05-18 15:36:03 +02:00
safe_test.c Include <inttypes.h> whenever including <cmocka.h> 2023-05-18 15:36:03 +02:00
siphash_test.c Include <inttypes.h> whenever including <cmocka.h> 2023-05-18 15:36:03 +02:00
sockaddr_test.c Include <inttypes.h> whenever including <cmocka.h> 2023-05-18 15:36:03 +02:00
stats_test.c Include <inttypes.h> whenever including <cmocka.h> 2023-05-18 15:36:03 +02:00
symtab_test.c Include <inttypes.h> whenever including <cmocka.h> 2023-05-18 15:36:03 +02:00
task_test.c Don't use reference counting in isc_timer unit 2023-01-18 22:39:26 +01:00
taskpool_test.c Include <inttypes.h> whenever including <cmocka.h> 2023-05-18 15:36:03 +02:00
time_test.c Include <inttypes.h> whenever including <cmocka.h> 2023-05-18 15:36:03 +02:00
timer_test.c Don't use reference counting in isc_timer unit 2023-01-18 22:39:26 +01:00
uv_wrap.h Move all the unit tests to /tests/<libname>/ 2022-05-31 12:06:00 +02:00