aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRiccardo Spagni <ric@spagni.net>2015-05-26 10:45:00 +0200
committerRiccardo Spagni <ric@spagni.net>2015-05-26 10:45:01 +0200
commite042fad3176d7d9867710b16cfb1ccab27baf901 (patch)
tree9a49c7435816a7f1c2af9efb2e273ddfc10d037e
parentMerge pull request #289 (diff)
parentFix compile for GCC 5.1.0 (diff)
downloadmonero-e042fad3176d7d9867710b16cfb1ccab27baf901.tar.xz
Merge pull request #291
6962253 Fix compile for GCC 5.1.0 (warptangent)
-rw-r--r--contrib/epee/include/storages/portable_storage.h2
-rw-r--r--src/p2p/net_node.inl6
2 files changed, 6 insertions, 2 deletions
diff --git a/contrib/epee/include/storages/portable_storage.h b/contrib/epee/include/storages/portable_storage.h
index bbfe5f85c..ba9292306 100644
--- a/contrib/epee/include/storages/portable_storage.h
+++ b/contrib/epee/include/storages/portable_storage.h
@@ -427,7 +427,7 @@ namespace epee
TRY_ENTRY();
CHECK_AND_ASSERT(hsec_array, false);
if(hsec_array->type() != typeid(array_entry_t<section>))
- return nullptr;
+ return false;
array_entry_t<section>& sec_array = boost::get<array_entry_t<section>>(*hsec_array);
h_child_section = sec_array.get_next_val();
if(!h_child_section)
diff --git a/src/p2p/net_node.inl b/src/p2p/net_node.inl
index cede6d0a0..029508e45 100644
--- a/src/p2p/net_node.inl
+++ b/src/p2p/net_node.inl
@@ -1194,6 +1194,10 @@ namespace nodetool
std::string port_=port;
peerid_type pr_ = pr;
auto cb_ = cb;*/
+
+ // GCC 5.1.0 gives error with second use of uint64_t (peerid_type) variable.
+ peerid_type pr_ = pr;
+
bool inv_call_res = epee::net_utils::async_invoke_remote_command2<COMMAND_PING::response>(ping_context.m_connection_id, COMMAND_PING::ID, req, m_net_server.get_config_object(),
[=](int code, const COMMAND_PING::response& rsp, p2p_connection_context& context)
{
@@ -1205,7 +1209,7 @@ namespace nodetool
if(rsp.status != PING_OK_RESPONSE_STATUS_TEXT || pr != rsp.peer_id)
{
- LOG_PRINT_CC_L2(ping_context, "back ping invoke wrong response \"" << rsp.status << "\" from" << ip << ":" << port << ", hsh_peer_id=" << pr << ", rsp.peer_id=" << rsp.peer_id);
+ LOG_PRINT_CC_L2(ping_context, "back ping invoke wrong response \"" << rsp.status << "\" from" << ip << ":" << port << ", hsh_peer_id=" << pr_ << ", rsp.peer_id=" << rsp.peer_id);
return;
}
m_net_server.get_config_object().close(ping_context.m_connection_id);