aboutsummaryrefslogtreecommitdiff
path: root/src/bench/checkblock.cpp
diff options
context:
space:
mode:
authorpracticalswift <[email protected]>2017-03-08 16:40:12 +0100
committerpracticalswift <[email protected]>2017-03-08 16:40:12 +0100
commit218d915445b5936c2de1ffe1e2c97b3f3d20becc (patch)
tree4e0b454f6889c5474fb86bf062914a8f47742a6d /src/bench/checkblock.cpp
parentMerge #9548: Remove min reasonable fee (diff)
downloaddiscoin-218d915445b5936c2de1ffe1e2c97b3f3d20becc.tar.xz
discoin-218d915445b5936c2de1ffe1e2c97b3f3d20becc.zip
[bench] Avoid function call arguments which are pointers to uninitialized values
Diffstat (limited to 'src/bench/checkblock.cpp')
-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 230e4ca77..c6c932454 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();