diff --git a/include/libtorrent/utp_stream.hpp b/include/libtorrent/utp_stream.hpp index e80087d2f..deada24ab 100644 --- a/include/libtorrent/utp_stream.hpp +++ b/include/libtorrent/utp_stream.hpp @@ -250,7 +250,6 @@ public: { if (!endpoint.address().is_v4()) { - error_code ec = asio::error::operation_not_supported; m_io_service.post(boost::bind(handler, asio::error::operation_not_supported, 0)); return; } diff --git a/src/lazy_bdecode.cpp b/src/lazy_bdecode.cpp index c2a0a6072..682b5e74b 100644 --- a/src/lazy_bdecode.cpp +++ b/src/lazy_bdecode.cpp @@ -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); diff --git a/src/natpmp.cpp b/src/natpmp.cpp index f1ca72ba0..9f67f8a29 100644 --- a/src/natpmp.cpp +++ b/src/natpmp.cpp @@ -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::iterator i = m_mappings.begin() , end(m_mappings.end()); i != end; ++i) { diff --git a/src/torrent.cpp b/src/torrent.cpp index 0872d3e43..45135c91f 100644 --- a/src/torrent.cpp +++ b/src/torrent.cpp @@ -4530,9 +4530,9 @@ namespace libtorrent boost::shared_ptr 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 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()