diff options
| author | Pavel Janík <[email protected]> | 2017-04-25 08:47:58 +0200 |
|---|---|---|
| committer | Pavel Janík <[email protected]> | 2017-04-25 08:47:58 +0200 |
| commit | 5ec883667fe6fe323fe3ae42ee54cff77450da7d (patch) | |
| tree | 8aa6772d0beeb679dc85eb209d2c2a8e75a2cd13 /src | |
| parent | Merge #10249: Switch CCoinsMap from boost to std unordered_map (diff) | |
| download | discoin-5ec883667fe6fe323fe3ae42ee54cff77450da7d.tar.xz discoin-5ec883667fe6fe323fe3ae42ee54cff77450da7d.zip | |
Prevent warning: variable 'x' is uninitialized
Diffstat (limited to 'src')
| -rw-r--r-- | src/bench/crypto_hash.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/bench/crypto_hash.cpp b/src/bench/crypto_hash.cpp index 5257e60e8..2914a36c7 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(); |