bind9/tests
Aram Sargsyan e2994d2b1a Fix a false positive compiler warning/error
When built with '-Doptimization=1', GCC produces a compiler warning:

    In file included from ../lib/isc/include/isc/lib.h:44,
                     from ../tests/dns/qp_test.c:26:
    ../tests/dns/qp_test.c: In function ‘check_predecessors_withchain’:
    ../lib/isc/include/isc/util.h:182:33: error: ‘ival’ may be used uninitialized [-Werror=maybe-uninitialized]
      182 |         (((a) == (b)) ? (void)0 : (_assert_int_equal(a, b, f, l), abort()))
          |         ~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    /usr/include/cmocka.h🔢5: note: in expansion of macro ‘_assert_int_equal’
     1234 |     _assert_int_equal(cast_to_largest_integral_type(a), \
          |     ^~~~~~~~~~~~~~~~~
    ../tests/dns/qp_test.c:859:18: note: ‘ival’ was declared here
      859 |         uint32_t ival;
          |                  ^~~~

This is apparently a false positive, because the qpiter_prev_with_name()
function, when returning ISC_R_SUCCESS, sets the 'ival' (passed to
it by a pointer), and the caller checks that the return value is
ISC_R_SUCCESS before using 'ival'.

Initialize the 'ival' variable to 0 anyway to avoid the build error.
2026-01-15 17:49:29 +00:00
..
bench Fix formatting after refactor 2025-12-10 11:28:10 +01:00
dns Fix a false positive compiler warning/error 2026-01-15 17:49:29 +00:00
include/tests Support compilation with cmocka 2.0.0+ 2026-01-07 10:38:45 +01:00
isc Support compilation with cmocka 2.0.0+ 2026-01-07 10:38:45 +01:00
isccfg Support compilation with cmocka 2.0.0+ 2026-01-07 10:38:45 +01:00
libtest Set unit test group name in CMocka tests 2025-12-19 18:26:22 +00:00
ns Put CMocka unit tests in a suite 2025-12-19 18:26:22 +00:00
.gitignore Move all the unit tests to /tests/<libname>/ 2022-05-28 14:53:02 -07:00
meson.build replace the build system with meson 2025-06-11 10:30:12 +03:00