Browse Source

Merge #9949: [bench] Avoid function call arguments which are pointers to uninitialized values

218d915 [bench] Avoid function call arguments which are pointers to uninitialized values (practicalswift)

Tree-SHA512: 68d62e9442094f171433291b7f13dba20fc7ead5fd7f2292e1eb97ae51aa2345d40224c4a65c2e5d3552802b3cd0f675a82b6181cf5b77e964355650b25089f0
0.15
Wladimir J. van der Laan 8 years ago
parent
commit
a27dbc55b1
No known key found for this signature in database
GPG Key ID: 74810B012346C9A6
  1. 4
      src/bench/checkblock.cpp

4
src/bench/checkblock.cpp

@ -22,7 +22,7 @@ static void DeserializeBlockTest(benchmark::State& state) @@ -22,7 +22,7 @@ static void DeserializeBlockTest(benchmark::State& state)
CDataStream stream((const char*)block_bench::block413567,
(const char*)&block_bench::block413567[sizeof(block_bench::block413567)],
SER_NETWORK, PROTOCOL_VERSION);
char a;
char a = '\0';
stream.write(&a, 1); // Prevent compaction
while (state.KeepRunning()) {
@ -37,7 +37,7 @@ static void DeserializeAndCheckBlockTest(benchmark::State& state) @@ -37,7 +37,7 @@ static void DeserializeAndCheckBlockTest(benchmark::State& state)
CDataStream stream((const char*)block_bench::block413567,
(const char*)&block_bench::block413567[sizeof(block_bench::block413567)],
SER_NETWORK, PROTOCOL_VERSION);
char a;
char a = '\0';
stream.write(&a, 1); // Prevent compaction
Consensus::Params params = Params(CBaseChainParams::MAIN).GetConsensus();

Loading…
Cancel
Save