fix GCC-9 warnings
This commit is contained in:
parent
d53caf51ab
commit
f9d31cf71b
@ -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__
|
||||
|
@ -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"; }
|
||||
|
@ -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)
|
||||
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -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)
|
||||
|
@ -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)
|
||||
|
@ -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;
|
||||
}
|
||||
} }
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user