Skip to content

Commit

Permalink
Prevent warning: variable 'x' is uninitialized
Browse files Browse the repository at this point in the history
  • Loading branch information
paveljanik committed Apr 25, 2017
1 parent c73af54 commit 5ec8836
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/bench/crypto_hash.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand All @@ -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();
Expand Down

0 comments on commit 5ec8836

Please sign in to comment.