diff --git a/examples/print.cpp b/examples/print.cpp index 3ae8d5d92..ce94d6697 100644 --- a/examples/print.cpp +++ b/examples/print.cpp @@ -74,7 +74,7 @@ std::string add_suffix(float val, char const* suffix) std::string color(std::string const& s, color_code c) { if (c == col_none) return s; - if (std::count(s.begin(), s.end(), ' ') == s.size()) return s; + if (std::count(s.begin(), s.end(), ' ') == int(s.size())) return s; char buf[1024]; snprintf(buf, sizeof(buf), "\x1b[3%dm%s\x1b[39m", c, s.c_str()); diff --git a/src/file.cpp b/src/file.cpp index 2102e90db..c86db2465 100644 --- a/src/file.cpp +++ b/src/file.cpp @@ -1788,6 +1788,8 @@ typedef struct _FILE_ALLOCATED_RANGE_BUFFER { TORRENT_ASSERT(is_open()); #if TORRENT_USE_PREADV + TORRENT_UNUSED(flags); + int ret = iov(&::preadv, native_handle(), file_offset, bufs, num_bufs, ec); #else @@ -1836,6 +1838,8 @@ typedef struct _FILE_ALLOCATED_RANGE_BUFFER { ec.clear(); #if TORRENT_USE_PREADV + TORRENT_UNUSED(flags); + int ret = iov(&::pwritev, native_handle(), file_offset, bufs, num_bufs, ec); #else diff --git a/src/session_impl.cpp b/src/session_impl.cpp index 0692185db..231eb2803 100644 --- a/src/session_impl.cpp +++ b/src/session_impl.cpp @@ -320,6 +320,8 @@ namespace aux { // be the hex encoded info-hash int servername_callback(SSL *s, int *ad, void *arg) { + TORRENT_UNUSED(ad); + session_impl* ses = (session_impl*)arg; const char* servername = SSL_get_servername(s, TLSEXT_NAMETYPE_host_name); diff --git a/src/torrent.cpp b/src/torrent.cpp index 594df33bf..e8ec3c6b5 100644 --- a/src/torrent.cpp +++ b/src/torrent.cpp @@ -5845,6 +5845,8 @@ namespace libtorrent std::string password_callback(int length, boost::asio::ssl::context::password_purpose p , std::string pw) { + TORRENT_UNUSED(p); + if (p != boost::asio::ssl::context::for_reading) return ""; return pw; }