Prevent warning: variable 'x' is uninitialized
This commit is contained in:
parent
8f23ab088d
commit
f84f56610e
|
@ -51,7 +51,7 @@ static void SHA512(benchmark::State& state)
|
||||||
static void FastRandom_32bit(benchmark::State& state)
|
static void FastRandom_32bit(benchmark::State& state)
|
||||||
{
|
{
|
||||||
FastRandomContext rng(true);
|
FastRandomContext rng(true);
|
||||||
uint32_t x;
|
uint32_t x = 0;
|
||||||
while (state.KeepRunning()) {
|
while (state.KeepRunning()) {
|
||||||
for (int i = 0; i < 1000000; i++) {
|
for (int i = 0; i < 1000000; i++) {
|
||||||
x += rng.rand32();
|
x += rng.rand32();
|
||||||
|
@ -62,7 +62,7 @@ static void FastRandom_32bit(benchmark::State& state)
|
||||||
static void FastRandom_1bit(benchmark::State& state)
|
static void FastRandom_1bit(benchmark::State& state)
|
||||||
{
|
{
|
||||||
FastRandomContext rng(true);
|
FastRandomContext rng(true);
|
||||||
uint32_t x;
|
uint32_t x = 0;
|
||||||
while (state.KeepRunning()) {
|
while (state.KeepRunning()) {
|
||||||
for (int i = 0; i < 1000000; i++) {
|
for (int i = 0; i < 1000000; i++) {
|
||||||
x += rng.randbool();
|
x += rng.randbool();
|
||||||
|
|
Loading…
Reference in New Issue