From f6c5d5802955b78a1614f7cfc07a7a3d3f125a12 Mon Sep 17 00:00:00 2001 From: "Wladimir J. van der Laan" Date: Tue, 25 Apr 2017 09:03:06 +0200 Subject: [PATCH] Merge #10272: [Tests] Prevent warning: variable 'x' is uninitialized MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 5ec8836 Prevent warning: variable 'x' is uninitialized (Pavel Janík) Tree-SHA512: 54e39d4b85303db033bd08c52ff2fa093ec9a1b1b9550911bb2123be60fa471cba81f36859681170695dfafb3a8a4c154122917c05b5a23837cf97c25907afc1 --- src/bench/crypto_hash.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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();