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
This commit is contained in:
Wladimir J. van der Laan 2017-04-10 14:19:48 +02:00
commit a27dbc55b1
No known key found for this signature in database
GPG key ID: 74810B012346C9A6

View file

@ -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)
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();