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 committed by Pasta
parent 3dcaf47494
commit e5ecff6e8a
No known key found for this signature in database
GPG Key ID: 0B8EB7A31A44D9C6

View File

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