Skip to content

Commit

Permalink
fix GCC-9 warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
arvidn committed Jun 2, 2019
1 parent d53caf5 commit f9d31cf
Show file tree
Hide file tree
Showing 7 changed files with 11 additions and 8 deletions.
3 changes: 3 additions & 0 deletions include/libtorrent/aux_/disable_warnings_push.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,9 @@ POSSIBILITY OF SUCH DAMAGE.
#pragma GCC diagnostic ignored "-Wimplicit-fallthrough"
#pragma GCC diagnostic ignored "-Wnoexcept-type"
#endif
#if __GNUC__ >= 9
#pragma GCC diagnostic ignored "-Wdeprecated-copy"
#endif
#endif

#ifdef __clang__
Expand Down
2 changes: 1 addition & 1 deletion src/kademlia/find_data.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ observer_ptr find_data::new_observer(udp::endpoint const& ep
#if TORRENT_USE_ASSERTS
if (o) o->m_in_constructor = false;
#endif
return std::move(o);
return o;
}

char const* find_data::name() const { return "find_data"; }
Expand Down
2 changes: 1 addition & 1 deletion src/kademlia/get_item.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ observer_ptr get_item::new_observer(udp::endpoint const& ep
#if TORRENT_USE_ASSERTS
if (o) o->m_in_constructor = false;
#endif
return std::move(o);
return o;
}

bool get_item::invoke(observer_ptr o)
Expand Down
6 changes: 3 additions & 3 deletions src/kademlia/get_peers.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,7 @@ observer_ptr get_peers::new_observer(udp::endpoint const& ep
#if TORRENT_USE_ASSERTS
if (o) o->m_in_constructor = false;
#endif
return std::move(o);
return o;
}

obfuscated_get_peers::obfuscated_get_peers(
Expand All @@ -184,7 +184,7 @@ observer_ptr obfuscated_get_peers::new_observer(udp::endpoint const& ep
#if TORRENT_USE_ASSERTS
if (o) o->m_in_constructor = false;
#endif
return std::move(o);
return o;
}
else
{
Expand All @@ -193,7 +193,7 @@ observer_ptr obfuscated_get_peers::new_observer(udp::endpoint const& ep
#if TORRENT_USE_ASSERTS
if (o) o->m_in_constructor = false;
#endif
return std::move(o);
return o;
}
}

Expand Down
2 changes: 1 addition & 1 deletion src/kademlia/refresh.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ observer_ptr bootstrap::new_observer(udp::endpoint const& ep
#if TORRENT_USE_ASSERTS
if (o) o->m_in_constructor = false;
#endif
return std::move(o);
return o;
}

bool bootstrap::invoke(observer_ptr o)
Expand Down
2 changes: 1 addition & 1 deletion src/kademlia/traversal_algorithm.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ observer_ptr traversal_algorithm::new_observer(udp::endpoint const& ep
#if TORRENT_USE_ASSERTS
if (o) o->m_in_constructor = false;
#endif
return std::move(o);
return o;
}

traversal_algorithm::traversal_algorithm(node& dht_node, node_id const& target)
Expand Down
2 changes: 1 addition & 1 deletion src/ut_pex.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -628,7 +628,7 @@ namespace libtorrent { namespace {
bt_peer_connection* c = static_cast<bt_peer_connection*>(pc.native_handle().get());
auto p = std::make_shared<ut_pex_peer_plugin>(m_torrent, *c, *this);
c->set_ut_pex(p);
return std::move(p);
return p;
}
} }

Expand Down

0 comments on commit f9d31cf

Please sign in to comment.