From: Ondřej Surý Date: Mon, 13 Jan 2020 10:38:43 +0000 (+0100) Subject: ATOMIC_VAR_INIT() must be used only for static variables (C17) X-Git-Tag: v9.15.8~10^2~2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=ede2208d96af986e44bac84a7c733c246f8f5fd4;p=thirdparty%2Fbind9.git ATOMIC_VAR_INIT() must be used only for static variables (C17) --- diff --git a/lib/dns/tests/zt_test.c b/lib/dns/tests/zt_test.c index 77d36a94f2b..b534b4190d8 100644 --- a/lib/dns/tests/zt_test.c +++ b/lib/dns/tests/zt_test.c @@ -165,12 +165,14 @@ asyncload_zone(void **state) { dns_db_t *db = NULL; FILE* zonefile, *origfile; char buf[4096]; - atomic_bool done = ATOMIC_VAR_INIT(false); + atomic_bool done; int i = 0; struct args args; UNUSED(state); + atomic_init(&done, false); + result = dns_test_makezone("foo", &zone, NULL, true); assert_int_equal(result, ISC_R_SUCCESS); @@ -266,12 +268,14 @@ asyncload_zt(void **state) { dns_view_t *view; dns_zt_t *zt = NULL; dns_db_t *db = NULL; - atomic_bool done = ATOMIC_VAR_INIT(false); + atomic_bool done; int i = 0; struct args args; UNUSED(state); + atomic_init(&done, false); + result = dns_test_makezone("foo", &zone1, NULL, true); assert_int_equal(result, ISC_R_SUCCESS); dns_zone_setfile(zone1, "testdata/zt/zone1.db",