From 2f611cf6007bce3b112e3a2e375c320d4f08f703 Mon Sep 17 00:00:00 2001 From: Evan Hunt Date: Tue, 7 Aug 2018 20:11:46 -0700 Subject: [PATCH] Silence a compiler warning on openbsd and fix windows build (cherry picked from commit b55338e4476f8eff44fa0b6693609e078586b95a) --- lib/dns/rdataset.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lib/dns/rdataset.c b/lib/dns/rdataset.c index 8494376052..3366c2aecc 100644 --- a/lib/dns/rdataset.c +++ b/lib/dns/rdataset.c @@ -400,6 +400,9 @@ towiresorted(dns_rdataset_t *rdataset, const dns_name_t *owner_name, } if ((shuffle || sort)) { + isc_uint32_t seed = 0; + unsigned int j; + /* * First we get handles to all of the rdata. */ @@ -416,7 +419,6 @@ towiresorted(dns_rdataset_t *rdataset, const dns_name_t *owner_name, } INSIST(i == count); - unsigned int j, seed; if (ISC_LIKELY(want_random)) { isc_random_get(&seed); j = 0;