cleanup, fix warnings
This commit is contained in:
parent
3a9d7fc66d
commit
47781bf2c5
|
@ -250,7 +250,6 @@ public:
|
|||
{
|
||||
if (!endpoint.address().is_v4())
|
||||
{
|
||||
error_code ec = asio::error::operation_not_supported;
|
||||
m_io_service.post(boost::bind<void>(handler, asio::error::operation_not_supported, 0));
|
||||
return;
|
||||
}
|
||||
|
|
|
@ -183,10 +183,7 @@ namespace libtorrent
|
|||
default:
|
||||
{
|
||||
if (!is_digit(t))
|
||||
{
|
||||
int a = 0;
|
||||
TORRENT_FAIL_BDECODE(errors::expected_value);
|
||||
}
|
||||
|
||||
boost::int64_t len = t - '0';
|
||||
start = parse_int(start, end, ':', len);
|
||||
|
|
|
@ -672,9 +672,9 @@ void natpmp::close_impl(mutex::scoped_lock& l)
|
|||
log("closing", l);
|
||||
#ifdef NATPMP_LOG
|
||||
std::cout << time_now_string() << " close" << std::endl;
|
||||
ptime now = time_now();
|
||||
#endif
|
||||
if (m_disabled) return;
|
||||
ptime now = time_now();
|
||||
for (std::vector<mapping_t>::iterator i = m_mappings.begin()
|
||||
, end(m_mappings.end()); i != end; ++i)
|
||||
{
|
||||
|
|
|
@ -4530,9 +4530,9 @@ namespace libtorrent
|
|||
boost::shared_ptr<socket_type> s(new (std::nothrow) socket_type(m_ses.m_io_service));
|
||||
if (!s) return;
|
||||
|
||||
bool ssl = string_begins_no_case("https://", web->url.c_str());
|
||||
void* userdata = 0;
|
||||
#ifdef TORRENT_USE_OPENSSL
|
||||
bool ssl = string_begins_no_case("https://", web->url.c_str());
|
||||
if (ssl)
|
||||
{
|
||||
userdata = m_ssl_ctx.get();
|
||||
|
@ -5731,7 +5731,7 @@ namespace libtorrent
|
|||
return false;
|
||||
}
|
||||
TORRENT_ASSERT(m_connections.find(p) == m_connections.end());
|
||||
peer_iterator ci = m_connections.insert(p).first;
|
||||
m_connections.insert(p).first;
|
||||
#ifdef TORRENT_DEBUG
|
||||
error_code ec;
|
||||
TORRENT_ASSERT(p->remote() == p->get_socket()->remote_endpoint(ec) || ec);
|
||||
|
@ -7127,8 +7127,6 @@ namespace libtorrent
|
|||
TORRENT_ASSERT(m_ses.is_network_thread());
|
||||
INVARIANT_CHECK;
|
||||
|
||||
ptime now = time_now();
|
||||
|
||||
#ifndef TORRENT_DISABLE_EXTENSIONS
|
||||
for (extension_list_t::iterator i = m_extensions.begin()
|
||||
, end(m_extensions.end()); i != end; ++i)
|
||||
|
@ -7548,7 +7546,6 @@ namespace libtorrent
|
|||
|
||||
std::vector<cached_piece_info> ret;
|
||||
m_ses.m_disk_thread.get_cache_info(info_hash(), ret);
|
||||
ptime now = time_now();
|
||||
|
||||
// remove write cache entries
|
||||
ret.erase(std::remove_if(ret.begin(), ret.end()
|
||||
|
|
Loading…
Reference in New Issue