aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWladimir J. van der Laan <laanwj@gmail.com>2017-04-10 14:19:48 +0200
committerWladimir J. van der Laan <laanwj@gmail.com>2017-04-10 14:19:55 +0200
commita27dbc55b1aaed971dda75a44cd0f581d28c7516 (patch)
treefbbaa1d47755c75522922fd6fef7b708048c120b
parent51833a17347fdc3615afb693e4ff8d347fc2eda2 (diff)
parent218d915445b5936c2de1ffe1e2c97b3f3d20becc (diff)
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
-rw-r--r--src/bench/checkblock.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/bench/checkblock.cpp b/src/bench/checkblock.cpp
index 230e4ca773..c6c932454a 100644
--- a/src/bench/checkblock.cpp
+++ b/src/bench/checkblock.cpp
@@ -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();