[bench] Avoid function call arguments which are pointers to uninitialized values
This commit is contained in:
parent
47510ad3dd
commit
218d915445
1 changed files with 2 additions and 2 deletions
|
@ -22,7 +22,7 @@ static void DeserializeBlockTest(benchmark::State& state)
|
||||||
CDataStream stream((const char*)block_bench::block413567,
|
CDataStream stream((const char*)block_bench::block413567,
|
||||||
(const char*)&block_bench::block413567[sizeof(block_bench::block413567)],
|
(const char*)&block_bench::block413567[sizeof(block_bench::block413567)],
|
||||||
SER_NETWORK, PROTOCOL_VERSION);
|
SER_NETWORK, PROTOCOL_VERSION);
|
||||||
char a;
|
char a = '\0';
|
||||||
stream.write(&a, 1); // Prevent compaction
|
stream.write(&a, 1); // Prevent compaction
|
||||||
|
|
||||||
while (state.KeepRunning()) {
|
while (state.KeepRunning()) {
|
||||||
|
@ -37,7 +37,7 @@ static void DeserializeAndCheckBlockTest(benchmark::State& state)
|
||||||
CDataStream stream((const char*)block_bench::block413567,
|
CDataStream stream((const char*)block_bench::block413567,
|
||||||
(const char*)&block_bench::block413567[sizeof(block_bench::block413567)],
|
(const char*)&block_bench::block413567[sizeof(block_bench::block413567)],
|
||||||
SER_NETWORK, PROTOCOL_VERSION);
|
SER_NETWORK, PROTOCOL_VERSION);
|
||||||
char a;
|
char a = '\0';
|
||||||
stream.write(&a, 1); // Prevent compaction
|
stream.write(&a, 1); // Prevent compaction
|
||||||
|
|
||||||
Consensus::Params params = Params(CBaseChainParams::MAIN).GetConsensus();
|
Consensus::Params params = Params(CBaseChainParams::MAIN).GetConsensus();
|
||||||
|
|
Loading…
Reference in a new issue