forked from premiere/premiere-libtorrent
fix some warnings
This commit is contained in:
parent
589888fd9f
commit
b7b0dafcca
|
@ -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());
|
||||
|
|
|
@ -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
|
||||
|
||||
|
|
|
@ -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);
|
||||
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue