bind9/tests
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
..
dns Include <inttypes.h> whenever including <cmocka.h> 2023-05-18 15:36:03 +02:00
include/tests Revert "Kill unit tests that run more than 1200 seconds" 2023-04-14 06:21:03 +02:00
irs Include <inttypes.h> whenever including <cmocka.h> 2023-05-18 15:36:03 +02:00
isc Fix cmocka-related compiler warnings in ht_test 2023-05-18 15:36:03 +02:00
isccfg Include <inttypes.h> whenever including <cmocka.h> 2023-05-18 15:36:03 +02:00
libtest remove nonfunctional DSCP implementation 2023-01-09 14:23:26 -08:00
ns Include <inttypes.h> whenever including <cmocka.h> 2023-05-18 15:36:03 +02:00
.gitignore
Makefile.am Stop the unit tests from running twice 2022-05-31 12:06:00 +02:00
unit-test-driver.sh.in Use SIGABRT rather than SIGKILL for long running unit test 2023-05-05 14:15:49 +02:00