Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Silence some compiler warnings #786

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion rai/blockstore.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -410,7 +410,6 @@ void rai::block_store::upgrade_v4_to_v5 (MDB_txn * transaction_a)
version_put (transaction_a, 5);
for (auto i (latest_begin (transaction_a)), n (latest_end ()); i != n; ++i)
{
rai::account account (i->first.uint256 ());
rai::account_info_v5 info (i->second);
rai::block_hash successor (0);
auto block (block_get (transaction_a, info.head));
Expand Down
2 changes: 1 addition & 1 deletion rai/core_test/network.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -889,7 +889,7 @@ TEST (network, ipv6_bind_send_ipv4)
std::array<uint8_t, 16> bytes2;
auto finish2 (false);
rai::endpoint endpoint4;
socket2.async_receive_from (boost::asio::buffer (bytes2.data (), bytes2.size ()), endpoint4, [&finish2](boost::system::error_code const & error, size_t size_a) {
socket2.async_receive_from (boost::asio::buffer (bytes2.data (), bytes2.size ()), endpoint4, [](boost::system::error_code const & error, size_t size_a) {
ASSERT_FALSE (!error);
ASSERT_EQ (16, size_a);
});
Expand Down
2 changes: 1 addition & 1 deletion rai/core_test/node.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1417,7 +1417,7 @@ TEST (node, balance_observer)
auto & node1 (*system.nodes[0]);
std::atomic<int> balances (0);
rai::keypair key;
node1.observers.account_balance.add ([&node1, &key, &balances](rai::account const & account_a, bool is_pending) {
node1.observers.account_balance.add ([&key, &balances](rai::account const & account_a, bool is_pending) {
if (key.pub == account_a && is_pending)
{
balances++;
Expand Down
1 change: 0 additions & 1 deletion rai/core_test/wallet.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -953,7 +953,6 @@ TEST (wallet, password_race_corrupt_seed)
runner.join ();
{
rai::transaction transaction (wallet->store.environment, nullptr, true);
bool ok = false;
if (!wallet->store.attempt_password (transaction, "1234"))
{
rai::raw_key seed_now;
Expand Down
8 changes: 4 additions & 4 deletions rai/node/bootstrap.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -174,8 +174,8 @@ endpoint (endpoint_a),
timeout (node_a->service),
block_count (0),
pending_stop (false),
hard_stop (false),
start_time (std::chrono::steady_clock::now ())
start_time (std::chrono::steady_clock::now ()),
hard_stop (false)
{
++attempt->connections;
}
Expand Down Expand Up @@ -797,8 +797,8 @@ connections (0),
pulling (0),
node (node_a),
account_count (0),
stopped (false),
total_blocks (0)
total_blocks (0),
stopped (false)
{
BOOST_LOG (node->log) << "Starting bootstrap attempt";
node->bootstrap_initiator.notify_listeners (true);
Expand Down
2 changes: 1 addition & 1 deletion rai/node/rpc.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1606,8 +1606,8 @@ class history_visitor : public rai::block_visitor
{
public:
history_visitor (rai::rpc_handler & handler_a, bool raw_a, rai::transaction & transaction_a, boost::property_tree::ptree & tree_a, rai::block_hash const & hash_a) :
raw (raw_a),
handler (handler_a),
raw (raw_a),
transaction (transaction_a),
tree (tree_a),
hash (hash_a)
Expand Down
2 changes: 1 addition & 1 deletion rai/node/wallet.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1079,7 +1079,7 @@ bool rai::wallet::should_generate_state_block (MDB_txn * transaction_a, rai::blo
bool rai::wallet::change_sync (rai::account const & source_a, rai::account const & representative_a)
{
std::promise<bool> result;
change_async (source_a, representative_a, [this, source_a, representative_a, &result](std::shared_ptr<rai::block> block_a) {
change_async (source_a, representative_a, [&result](std::shared_ptr<rai::block> block_a) {
result.set_value (block_a == nullptr);
},
true);
Expand Down
2 changes: 1 addition & 1 deletion rai/qt/qt.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -116,8 +116,8 @@ void rai_qt::self_pane::refresh_balance ()

rai_qt::accounts::accounts (rai_qt::wallet & wallet_a) :
window (new QWidget),
layout (new QVBoxLayout),
wallet_balance_label (new QLabel),
layout (new QVBoxLayout),
model (new QStandardItemModel),
view (new QTableView),
use_account (new QPushButton ("Use account")),
Expand Down
1 change: 0 additions & 1 deletion rai/rai_node/entry.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -222,7 +222,6 @@ int main (int argc, char * const * argv)
std::map<rai::account, rai::uint128_t> calculated;
for (auto i (node.node->store.latest_begin (transaction)), n (node.node->store.latest_end ()); i != n; ++i)
{
rai::account account (i->first.uint256 ());
rai::account_info info (i->second);
rai::block_hash rep_block (node.node->ledger.representative_calculated (transaction, info.head));
std::unique_ptr<rai::block> block (node.node->store.block_get (transaction, rep_block));
Expand Down