aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorWladimir J. van der Laan <laanwj@gmail.com>2017-04-25 09:03:06 +0200
committerWladimir J. van der Laan <laanwj@gmail.com>2017-04-25 09:39:02 +0200
commit54e2d87e792f683593fd9f06c2e1bff4b03a0e75 (patch)
tree8aa6772d0beeb679dc85eb209d2c2a8e75a2cd13 /src
parentc73af5416b66f09cec0eb106f5a10f9bb6ef9cb1 (diff)
parent5ec883667fe6fe323fe3ae42ee54cff77450da7d (diff)
Merge #10272: [Tests] Prevent warning: variable 'x' is uninitialized
5ec8836 Prevent warning: variable 'x' is uninitialized (Pavel Janík) Tree-SHA512: 54e39d4b85303db033bd08c52ff2fa093ec9a1b1b9550911bb2123be60fa471cba81f36859681170695dfafb3a8a4c154122917c05b5a23837cf97c25907afc1
Diffstat (limited to 'src')
-rw-r--r--src/bench/crypto_hash.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/bench/crypto_hash.cpp b/src/bench/crypto_hash.cpp
index 5257e60e81..2914a36c7b 100644
--- a/src/bench/crypto_hash.cpp
+++ b/src/bench/crypto_hash.cpp
@@ -73,7 +73,7 @@ static void SipHash_32b(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();
@@ -84,7 +84,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();