bind9/tests/isc
Michał Kępień 8d36e68c7a
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:68:45: warning: passing argument 2 of ‘_assert_ptr_equal’ makes pointer from integer without a cast [-Wint-conversion]
       68 |                 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:163:45: warning: passing argument 2 of ‘_assert_ptr_equal’ makes pointer from integer without a cast [-Wint-conversion]
      163 |                 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
2023-05-18 15:12:23 +02:00
..
testdata/file Move all the unit tests to /tests/<libname>/ 2022-05-28 14:53:02 -07:00
aes_test.c Include <inttypes.h> whenever including <cmocka.h> 2023-05-18 15:12:23 +02:00
ascii_test.c Include <inttypes.h> whenever including <cmocka.h> 2023-05-18 15:12:23 +02:00
async_test.c Include <inttypes.h> whenever including <cmocka.h> 2023-05-18 15:12:23 +02:00
buffer_test.c Include <inttypes.h> whenever including <cmocka.h> 2023-05-18 15:12:23 +02:00
counter_test.c Include <inttypes.h> whenever including <cmocka.h> 2023-05-18 15:12:23 +02:00
crc64_test.c Include <inttypes.h> whenever including <cmocka.h> 2023-05-18 15:12:23 +02:00
dnsstream_utils_test.c Remove do-nothing header <isc/print.h> 2023-02-15 16:44:47 +00:00
dnsstream_utils_test_data.h Add a set of unit tests for dnsbuffer_t and dnsstream_assembler_t 2022-12-20 21:24:45 +02:00
doh_test.c unit tests: include an OpenSSL header before including cmocka.h 2023-04-14 12:11:52 +00:00
errno_test.c Include <inttypes.h> whenever including <cmocka.h> 2023-05-18 15:12:23 +02:00
file_test.c Include <inttypes.h> whenever including <cmocka.h> 2023-05-18 15:12:23 +02:00
hash_test.c Remove do-nothing header <isc/print.h> 2023-02-15 16:44:47 +00:00
hashmap_test.c Remove do-nothing header <isc/print.h> 2023-02-15 16:44:47 +00:00
heap_test.c Include <inttypes.h> whenever including <cmocka.h> 2023-05-18 15:12:23 +02:00
histo_test.c Include <inttypes.h> whenever including <cmocka.h> 2023-05-18 15:12:23 +02:00
hmac_test.c Include <inttypes.h> whenever including <cmocka.h> 2023-05-18 15:12:23 +02:00
ht_test.c Fix cmocka-related compiler warnings in ht_test 2023-05-18 15:12:23 +02:00
job_test.c Include <inttypes.h> whenever including <cmocka.h> 2023-05-18 15:12:23 +02:00
lex_test.c Include <inttypes.h> whenever including <cmocka.h> 2023-05-18 15:12:23 +02:00
loop_test.c Include <inttypes.h> whenever including <cmocka.h> 2023-05-18 15:12:23 +02:00
Makefile.am Add mutex unit test 2023-04-27 13:15:50 +02:00
md_test.c Include <inttypes.h> whenever including <cmocka.h> 2023-05-18 15:12:23 +02:00
mem_test.c Simplify isc_thread a little 2023-04-27 12:38:53 +02:00
mutex_test.c Include <inttypes.h> whenever including <cmocka.h> 2023-05-18 15:12:23 +02:00
netaddr_test.c Include <inttypes.h> whenever including <cmocka.h> 2023-05-18 15:12:23 +02:00
netmgr_common.c Include <inttypes.h> whenever including <cmocka.h> 2023-05-18 15:12:23 +02:00
netmgr_common.h Fix the streaming read callback shutdown logic 2023-04-20 12:58:32 +02:00
parse_test.c Move all the unit tests to /tests/<libname>/ 2022-05-28 14:53:02 -07:00
quota_test.c Include <inttypes.h> whenever including <cmocka.h> 2023-05-18 15:12:23 +02:00
radix_test.c Include <inttypes.h> whenever including <cmocka.h> 2023-05-18 15:12:23 +02:00
random_test.c Remove do-nothing header <isc/print.h> 2023-02-15 16:44:47 +00:00
ratelimiter_test.c Refactor isc_time_now() to return time, and not result 2023-03-31 15:02:06 +02:00
regex_test.c Include <inttypes.h> whenever including <cmocka.h> 2023-05-18 15:12:23 +02:00
result_test.c Include <inttypes.h> whenever including <cmocka.h> 2023-05-18 15:12:23 +02:00
safe_test.c Include <inttypes.h> whenever including <cmocka.h> 2023-05-18 15:12:23 +02:00
siphash_test.c Include <inttypes.h> whenever including <cmocka.h> 2023-05-18 15:12:23 +02:00
sockaddr_test.c Include <inttypes.h> whenever including <cmocka.h> 2023-05-18 15:12:23 +02:00
spinlock_test.c Include <inttypes.h> whenever including <cmocka.h> 2023-05-18 15:12:23 +02:00
stats_test.c Include <inttypes.h> whenever including <cmocka.h> 2023-05-18 15:12:23 +02:00
stream_shutdown.c Include <inttypes.h> whenever including <cmocka.h> 2023-05-18 15:12:23 +02:00
symtab_test.c Include <inttypes.h> whenever including <cmocka.h> 2023-05-18 15:12:23 +02:00
tcp_test.c Include <inttypes.h> whenever including <cmocka.h> 2023-05-18 15:12:23 +02:00
tcpdns_test.c Include <inttypes.h> whenever including <cmocka.h> 2023-05-18 15:12:23 +02:00
time_test.c Include <inttypes.h> whenever including <cmocka.h> 2023-05-18 15:12:23 +02:00
timer_test.c Refactor isc_time_now() to return time, and not result 2023-03-31 15:02:06 +02:00
tls_test.c Include <inttypes.h> whenever including <cmocka.h> 2023-05-18 15:12:23 +02:00
tlsdns_test.c Include <inttypes.h> whenever including <cmocka.h> 2023-05-18 15:12:23 +02:00
udp_test.c Include <inttypes.h> whenever including <cmocka.h> 2023-05-18 15:12:23 +02:00
uv_wrap.h Replace __attribute__((unused)) with ISC_ATTR_UNUSED attribute macro 2023-03-30 23:29:25 +02:00
work_test.c Include <inttypes.h> whenever including <cmocka.h> 2023-05-18 15:12:23 +02:00