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

Fix assorted compiler warnings #2071

Merged
merged 1 commit into from
Jun 10, 2019
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 nano/core_test/websocket.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,6 @@ boost::optional<std::string> websocket_test_call (std::string host, std::string

if (ws.is_open ())
{
boost::beast::error_code ec_ignored;
ws.async_close (boost::beast::websocket::close_code::normal, [](boost::beast::error_code const & ec) {
// A synchronous close usually hangs in tests when the server's io_context stops looping
// An async_close solves this problem
Expand Down
2 changes: 0 additions & 2 deletions nano/nano_rpc/entry.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,6 @@ int main (int argc, char * const * argv)
return 1;
}
boost::program_options::notify (vm);
int result (0);

auto network (vm.find ("network"));
if (network != vm.end ())
Expand Down Expand Up @@ -134,7 +133,6 @@ int main (int argc, char * const * argv)
else
{
std::cout << description << std::endl;
result = -1;
}

return 1;
Expand Down
2 changes: 1 addition & 1 deletion nano/node/daemonconfig.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ bool nano::daemon_config::upgrade_json (unsigned version_a, nano::jsonconfig & j
{
case 1:
{
bool opencl_enable_l;
bool opencl_enable_l{ false };
json.get_optional<bool> ("opencl_enable", opencl_enable_l);
if (!opencl_enable_l)
{
Expand Down
1 change: 0 additions & 1 deletion nano/node/election.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,6 @@ bool nano::election::have_quorum (nano::tally_t const & tally_a, nano::uint128_t
if (tally_sum >= node.config.online_weight_minimum.number ())
{
auto i (tally_a.begin ());
auto const & first (i->first);
++i;
auto second (i != tally_a.end () ? i->first : 0);
auto delta_l (node.delta ());
Expand Down
3 changes: 1 addition & 2 deletions nano/node/logging.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -145,10 +145,9 @@ bool nano::logging::upgrade_json (unsigned version_a, nano::jsonconfig & json)

nano::error nano::logging::deserialize_json (bool & upgraded_a, nano::jsonconfig & json)
{
int version_l;
int version_l{ 1 };
if (!json.has_key ("version"))
{
version_l = 1;
json.put ("version", version_l);

auto work_peers_l (json.get_optional_child ("work_peers"));
Expand Down
2 changes: 1 addition & 1 deletion nano/node/node.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -196,6 +196,7 @@ node (init_a, io_ctx_a, application_path_a, alarm_a, nano::node_config (peering_

nano::node::node (nano::node_init & init_a, boost::asio::io_context & io_ctx_a, boost::filesystem::path const & application_path_a, nano::alarm & alarm_a, nano::node_config const & config_a, nano::work_pool & work_a, nano::node_flags flags_a, bool delay_frontier_confirmation_height_updating) :
io_ctx (io_ctx_a),
node_initialized_latch (1),
config (config_a),
stats (config.stat_config),
flags (flags_a),
Expand Down Expand Up @@ -228,7 +229,6 @@ active (*this, delay_frontier_confirmation_height_updating),
confirmation_height_processor (pending_confirmation_height, store, ledger.stats, active, ledger.epoch_link, logger),
payment_observer_processor (observers.blocks),
wallets (init_a.wallets_store_init, *this),
node_initialized_latch (1),
startup_time (std::chrono::steady_clock::now ())
{
if (!init_a.error ())
Expand Down