From 95712625356118eedac5b767665e5f1f30e40cf0 Mon Sep 17 00:00:00 2001 From: Lassi Kortela Date: Sun, 18 Aug 2019 13:40:04 +0300 Subject: [PATCH] Use backward compatible variable initializers --- c/bitvector.c | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/c/bitvector.c b/c/bitvector.c index 340fe14..407b705 100644 --- a/c/bitvector.c +++ b/c/bitvector.c @@ -107,13 +107,17 @@ static int ntz(uint32_t x) // returns n if no set bits. uint32_t bitvector_next(uint32_t *b, uint64_t n0, uint64_t n) { + uint32_t i; + uint32_t nb; + uint32_t nw; + uint32_t w; + if (n0 >= n) return n; - uint32_t i = n0 >> 5; - uint32_t nb = n0 & 31; - uint32_t nw = (n + 31) >> 5; - uint32_t w; + i = n0 >> 5; + nb = n0 & 31; + nw = (n + 31) >> 5; if (i < nw - 1 || (n & 31) == 0) w = b[i] >> nb;