mirror of
https://github.com/isc-projects/bind9.git
synced 2026-02-23 09:51:03 -05:00
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
|
||
|---|---|---|
| .. | ||
| testdata/file | ||
| aes_test.c | ||
| buffer_test.c | ||
| counter_test.c | ||
| crc64_test.c | ||
| doh_test.c | ||
| errno_test.c | ||
| file_test.c | ||
| hash_test.c | ||
| heap_test.c | ||
| hmac_test.c | ||
| ht_test.c | ||
| lex_test.c | ||
| Makefile.am | ||
| md_test.c | ||
| mem_test.c | ||
| netaddr_test.c | ||
| netmgr_test.c | ||
| parse_test.c | ||
| pool_test.c | ||
| quota_test.c | ||
| radix_test.c | ||
| random_test.c | ||
| regex_test.c | ||
| result_test.c | ||
| safe_test.c | ||
| siphash_test.c | ||
| sockaddr_test.c | ||
| stats_test.c | ||
| symtab_test.c | ||
| task_test.c | ||
| taskpool_test.c | ||
| time_test.c | ||
| timer_test.c | ||
| uv_wrap.h | ||