diff --git a/src/bench/crypto_hash.cpp b/src/bench/crypto_hash.cpp index 27dbbf62b..1b0d1fa75 100644 --- a/src/bench/crypto_hash.cpp +++ b/src/bench/crypto_hash.cpp @@ -92,7 +92,7 @@ static void HASH_SipHash_0032b(benchmark::State& state) static void FastRandom_32bit(benchmark::State& state) { FastRandomContext rng(true); - uint32_t x; + uint32_t x = 0; while (state.KeepRunning()) { for (int i = 0; i < 1000000; i++) { x += rng.rand32(); @@ -103,7 +103,7 @@ static void FastRandom_32bit(benchmark::State& state) static void FastRandom_1bit(benchmark::State& state) { FastRandomContext rng(true); - uint32_t x; + uint32_t x = 0; while (state.KeepRunning()) { for (int i = 0; i < 1000000; i++) { x += rng.randbool();