fix GCC-9 warnings

This commit is contained in:
arvidn 2019-06-02 19:26:49 +02:00 committed by Arvid Norberg
parent d53caf51ab
commit f9d31cf71b
7 changed files with 11 additions and 8 deletions

View File

@ -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__

View File

@ -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"; }

View File

@ -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)

View File

@ -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(
@ -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
{
@ -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;
}
}

View File

@ -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)

View File

@ -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)

View File

@ -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;
}
} }