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 "-Wimplicit-fallthrough"
|
||||||
#pragma GCC diagnostic ignored "-Wnoexcept-type"
|
#pragma GCC diagnostic ignored "-Wnoexcept-type"
|
||||||
#endif
|
#endif
|
||||||
|
#if __GNUC__ >= 9
|
||||||
|
#pragma GCC diagnostic ignored "-Wdeprecated-copy"
|
||||||
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef __clang__
|
#ifdef __clang__
|
||||||
|
|
|
@ -127,7 +127,7 @@ observer_ptr find_data::new_observer(udp::endpoint const& ep
|
||||||
#if TORRENT_USE_ASSERTS
|
#if TORRENT_USE_ASSERTS
|
||||||
if (o) o->m_in_constructor = false;
|
if (o) o->m_in_constructor = false;
|
||||||
#endif
|
#endif
|
||||||
return std::move(o);
|
return o;
|
||||||
}
|
}
|
||||||
|
|
||||||
char const* find_data::name() const { return "find_data"; }
|
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 TORRENT_USE_ASSERTS
|
||||||
if (o) o->m_in_constructor = false;
|
if (o) o->m_in_constructor = false;
|
||||||
#endif
|
#endif
|
||||||
return std::move(o);
|
return o;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool get_item::invoke(observer_ptr 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 TORRENT_USE_ASSERTS
|
||||||
if (o) o->m_in_constructor = false;
|
if (o) o->m_in_constructor = false;
|
||||||
#endif
|
#endif
|
||||||
return std::move(o);
|
return o;
|
||||||
}
|
}
|
||||||
|
|
||||||
obfuscated_get_peers::obfuscated_get_peers(
|
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 TORRENT_USE_ASSERTS
|
||||||
if (o) o->m_in_constructor = false;
|
if (o) o->m_in_constructor = false;
|
||||||
#endif
|
#endif
|
||||||
return std::move(o);
|
return o;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
@ -193,7 +193,7 @@ observer_ptr obfuscated_get_peers::new_observer(udp::endpoint const& ep
|
||||||
#if TORRENT_USE_ASSERTS
|
#if TORRENT_USE_ASSERTS
|
||||||
if (o) o->m_in_constructor = false;
|
if (o) o->m_in_constructor = false;
|
||||||
#endif
|
#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 TORRENT_USE_ASSERTS
|
||||||
if (o) o->m_in_constructor = false;
|
if (o) o->m_in_constructor = false;
|
||||||
#endif
|
#endif
|
||||||
return std::move(o);
|
return o;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool bootstrap::invoke(observer_ptr 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 TORRENT_USE_ASSERTS
|
||||||
if (o) o->m_in_constructor = false;
|
if (o) o->m_in_constructor = false;
|
||||||
#endif
|
#endif
|
||||||
return std::move(o);
|
return o;
|
||||||
}
|
}
|
||||||
|
|
||||||
traversal_algorithm::traversal_algorithm(node& dht_node, node_id const& target)
|
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());
|
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);
|
auto p = std::make_shared<ut_pex_peer_plugin>(m_torrent, *c, *this);
|
||||||
c->set_ut_pex(p);
|
c->set_ut_pex(p);
|
||||||
return std::move(p);
|
return p;
|
||||||
}
|
}
|
||||||
} }
|
} }
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue