From e5d6251e8c70b981926c436cdcd4e424da86450a Mon Sep 17 00:00:00 2001 From: clemahieu Date: Fri, 10 Feb 2017 19:31:50 -0600 Subject: [PATCH] Unititialized values caught by valgrind. --- rai/core_test/rpc.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/rai/core_test/rpc.cpp b/rai/core_test/rpc.cpp index d7a15271..2a78ddb9 100644 --- a/rai/core_test/rpc.cpp +++ b/rai/core_test/rpc.cpp @@ -1388,7 +1388,7 @@ TEST (rpc, work_peer_bad) rpc.start (); node2.config.work_peers.push_back (std::make_pair (boost::asio::ip::address_v6::any (), 0)); rai::block_hash hash1 (1); - uint64_t work; + uint64_t work (0); node2.generate_work (hash1, [&work] (uint64_t work_a) { work = work_a; @@ -1412,7 +1412,7 @@ TEST (rpc, work_peer_one) rpc.start (); node2.config.work_peers.push_back (std::make_pair (node1.network.endpoint ().address (), rpc.config.port)); rai::keypair key1; - uint64_t work; + uint64_t work (0); node2.generate_work (key1.pub, [&work] (uint64_t work_a) { work = work_a; @@ -1453,7 +1453,7 @@ TEST (rpc, work_peer_many) for (auto i (0); i < 10; ++i) { rai::keypair key1; - uint64_t work; + uint64_t work (0); node1.generate_work (key1.pub, [&work] (uint64_t work_a) { work = work_a;