fix some warnings
This commit is contained in:
parent
924fb5d03c
commit
c19c6b2cc1
|
@ -46,6 +46,7 @@ POSSIBILITY OF SUCH DAMAGE.
|
|||
|
||||
#ifdef __clang__
|
||||
#pragma clang diagnostic push
|
||||
#pragma clang diagnostic ignored "-Wall"
|
||||
#pragma clang diagnostic ignored "-Weverything"
|
||||
#pragma clang diagnostic ignored "-Wsign-conversion"
|
||||
#pragma clang diagnostic ignored "-Wconversion"
|
||||
|
@ -61,6 +62,9 @@ POSSIBILITY OF SUCH DAMAGE.
|
|||
#pragma clang diagnostic ignored "-Wundef"
|
||||
#pragma clang diagnostic ignored "-Wshadow"
|
||||
#pragma clang diagnostic ignored "-Wimplicit-fallthrough"
|
||||
#pragma clang diagnostic ignored "-Wc++11-long-long"
|
||||
#pragma clang diagnostic ignored "-Wc++11-extensions"
|
||||
#pragma clang diagnostic ignored "-Wextra-semi"
|
||||
#endif
|
||||
|
||||
#ifdef _MSC_VER
|
||||
|
|
|
@ -307,7 +307,7 @@ namespace libtorrent { namespace aux
|
|||
// all torrents that have resume data to save
|
||||
// torrent_want_save_resume,
|
||||
|
||||
num_torrent_lists,
|
||||
num_torrent_lists
|
||||
};
|
||||
|
||||
virtual std::vector<torrent*>& torrent_list(int i) = 0;
|
||||
|
|
|
@ -164,7 +164,7 @@ struct bdecode_token
|
|||
{
|
||||
max_offset = (1 << 29) - 1,
|
||||
max_next_item = (1 << 29) - 1,
|
||||
max_header = (1 << 3) - 1,
|
||||
max_header = (1 << 3) - 1
|
||||
};
|
||||
|
||||
bdecode_token(boost::uint32_t off, bdecode_token::type_t t)
|
||||
|
|
|
@ -34,6 +34,10 @@ POSSIBILITY OF SUCH DAMAGE.
|
|||
#define TORRENT_CHAINED_BUFFER_HPP_INCLUDED
|
||||
|
||||
#include "libtorrent/config.hpp"
|
||||
#include "libtorrent/disk_io_job.hpp" // for block_cache_reference
|
||||
#include "libtorrent/debug.hpp"
|
||||
|
||||
#include "libtorrent/aux_/disable_warnings_push.hpp"
|
||||
|
||||
#include <boost/version.hpp>
|
||||
#if BOOST_VERSION < 103500
|
||||
|
@ -45,8 +49,7 @@ POSSIBILITY OF SUCH DAMAGE.
|
|||
#include <vector>
|
||||
#include <string.h> // for memcpy
|
||||
|
||||
#include "libtorrent/disk_io_job.hpp" // for block_cache_reference
|
||||
#include "libtorrent/debug.hpp"
|
||||
#include "libtorrent/aux_/disable_warnings_pop.hpp"
|
||||
|
||||
namespace libtorrent
|
||||
{
|
||||
|
|
|
@ -147,8 +147,7 @@ namespace libtorrent
|
|||
close_corrupt_pieces,
|
||||
|
||||
close_pex_message_too_big,
|
||||
close_pex_too_frequent,
|
||||
|
||||
close_pex_too_frequent
|
||||
};
|
||||
|
||||
close_reason_t error_to_close_reason(error_code const& ec);
|
||||
|
|
|
@ -148,7 +148,7 @@ namespace libtorrent
|
|||
// another torrent.
|
||||
//
|
||||
// .. _BEP38: http://www.bittorrent.org/beps/bep_0038.html
|
||||
mutable_torrent_support = 16,
|
||||
mutable_torrent_support = 16
|
||||
};
|
||||
|
||||
// The ``piece_size`` is the size of each piece in bytes. It must
|
||||
|
|
|
@ -133,7 +133,7 @@ namespace libtorrent
|
|||
in_progress = 0x20,
|
||||
|
||||
// turns into file::coalesce_buffers in the file operation
|
||||
coalesce_buffers = 0x40,
|
||||
coalesce_buffers = 0x40
|
||||
};
|
||||
|
||||
// for write jobs, returns true if its block
|
||||
|
|
|
@ -438,7 +438,7 @@ namespace libtorrent
|
|||
|
||||
// the job cannot be completed right now, put it back in the
|
||||
// queue and try again later
|
||||
retry_job = -201,
|
||||
retry_job = -201
|
||||
};
|
||||
|
||||
void add_completed_job(disk_io_job* j);
|
||||
|
|
|
@ -581,7 +581,7 @@ namespace libtorrent
|
|||
partfile_read,
|
||||
partfile_write,
|
||||
check_resume,
|
||||
hard_link,
|
||||
hard_link
|
||||
};
|
||||
|
||||
// Returns a string literal representing the file operation
|
||||
|
|
|
@ -71,7 +71,7 @@ namespace libtorrent
|
|||
list.push_back(self);
|
||||
}
|
||||
};
|
||||
};
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
|
|
|
@ -145,7 +145,7 @@ namespace libtorrent
|
|||
list_node* m_last;
|
||||
int m_size;
|
||||
};
|
||||
};
|
||||
}
|
||||
|
||||
#endif // LINKED_LIST_HPP
|
||||
|
||||
|
|
|
@ -96,7 +96,7 @@ namespace libtorrent
|
|||
op_ssl_handshake,
|
||||
|
||||
// a connection failed to satisfy the bind interface setting
|
||||
op_get_interface,
|
||||
op_get_interface
|
||||
};
|
||||
|
||||
}
|
||||
|
|
|
@ -124,7 +124,7 @@ namespace libtorrent
|
|||
flag_encryption = 0x1,
|
||||
flag_seed = 0x2,
|
||||
flag_utp = 0x4,
|
||||
flag_holepunch = 0x8,
|
||||
flag_holepunch = 0x8
|
||||
};
|
||||
|
||||
// this is called once for every torrent_peer we get from
|
||||
|
|
|
@ -98,7 +98,7 @@ namespace libtorrent
|
|||
int_type_base = 0x4000,
|
||||
bool_type_base = 0x8000,
|
||||
type_mask = 0xc000,
|
||||
index_mask = 0x3fff,
|
||||
index_mask = 0x3fff
|
||||
};
|
||||
|
||||
enum string_types
|
||||
|
|
|
@ -51,7 +51,7 @@ namespace libtorrent
|
|||
{
|
||||
cache_error = -1,
|
||||
not_in_cache = -2,
|
||||
no_exist = -3,
|
||||
no_exist = -3
|
||||
};
|
||||
|
||||
// returns the size of the file or one
|
||||
|
|
|
@ -87,7 +87,7 @@ namespace libtorrent
|
|||
tailqueue_node* m_last;
|
||||
int m_size;
|
||||
};
|
||||
};
|
||||
}
|
||||
|
||||
#endif // TAILQUEUE_HPP
|
||||
|
||||
|
|
|
@ -468,8 +468,9 @@ namespace libtorrent
|
|||
|
||||
// the error occurred while loading the .torrent file via the user
|
||||
// supplied load function
|
||||
error_file_metadata = -4,
|
||||
error_file_metadata = -4
|
||||
};
|
||||
|
||||
void set_error(error_code const& ec, int file);
|
||||
bool has_error() const { return !!m_error; }
|
||||
error_code error() const { return m_error; }
|
||||
|
|
|
@ -610,7 +610,7 @@ namespace libtorrent
|
|||
// priorities having changed etc. If the resume data doesn't need
|
||||
// saving, a save_resume_data_failed_alert is posted with the error
|
||||
// resume_data_not_modified.
|
||||
only_if_modified = 4,
|
||||
only_if_modified = 4
|
||||
};
|
||||
|
||||
// ``save_resume_data()`` generates fast-resume data and returns it as an
|
||||
|
|
|
@ -645,7 +645,7 @@ namespace libtorrent
|
|||
}
|
||||
return ret;
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
#endif // TORRENT_NO_DEPRECATE
|
||||
|
||||
|
|
Loading…
Reference in New Issue