Skip to content

Commit a27dbc5

Browse files
committed
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
2 parents 51833a1 + 218d915 commit a27dbc5

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/bench/checkblock.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ static void DeserializeBlockTest(benchmark::State& state)
2222
CDataStream stream((const char*)block_bench::block413567,
2323
(const char*)&block_bench::block413567[sizeof(block_bench::block413567)],
2424
SER_NETWORK, PROTOCOL_VERSION);
25-
char a;
25+
char a = '\0';
2626
stream.write(&a, 1); // Prevent compaction
2727

2828
while (state.KeepRunning()) {
@@ -37,7 +37,7 @@ static void DeserializeAndCheckBlockTest(benchmark::State& state)
3737
CDataStream stream((const char*)block_bench::block413567,
3838
(const char*)&block_bench::block413567[sizeof(block_bench::block413567)],
3939
SER_NETWORK, PROTOCOL_VERSION);
40-
char a;
40+
char a = '\0';
4141
stream.write(&a, 1); // Prevent compaction
4242

4343
Consensus::Params params = Params(CBaseChainParams::MAIN).GetConsensus();

0 commit comments

Comments
 (0)