fix more warnings and some build issues
This commit is contained in:
parent
a1f59f6cf1
commit
87c46a144d
|
@ -1,3 +1,6 @@
|
|||
// ignore warnings in this file
|
||||
#include "libtorrent/aux_/disable_warnings_push.hpp"
|
||||
|
||||
#include "libtorrent/ed25519.hpp"
|
||||
#include "ge.h"
|
||||
#include "sc.h"
|
||||
|
|
|
@ -1,3 +1,6 @@
|
|||
// ignore warnings in this file
|
||||
#include "libtorrent/aux_/disable_warnings_push.hpp"
|
||||
|
||||
#include "fixedint.h"
|
||||
#include "fe.h"
|
||||
|
||||
|
|
|
@ -1,3 +1,6 @@
|
|||
// ignore warnings in this file
|
||||
#include "libtorrent/aux_/disable_warnings_push.hpp"
|
||||
|
||||
#include "ge.h"
|
||||
#include "precomp_data.h"
|
||||
|
||||
|
|
|
@ -1,3 +1,6 @@
|
|||
// ignore warnings in this file
|
||||
#include "libtorrent/aux_/disable_warnings_push.hpp"
|
||||
|
||||
#include "libtorrent/ed25519.hpp"
|
||||
#include "fe.h"
|
||||
|
||||
|
|
|
@ -1,3 +1,6 @@
|
|||
// ignore warnings in this file
|
||||
#include "libtorrent/aux_/disable_warnings_push.hpp"
|
||||
|
||||
#include "libtorrent/ed25519.hpp"
|
||||
#include "sha512.h"
|
||||
#include "ge.h"
|
||||
|
|
|
@ -1,3 +1,6 @@
|
|||
// ignore warnings in this file
|
||||
#include "libtorrent/aux_/disable_warnings_push.hpp"
|
||||
|
||||
#include "fixedint.h"
|
||||
#include "sc.h"
|
||||
|
||||
|
|
|
@ -1,3 +1,6 @@
|
|||
// ignore warnings in this file
|
||||
#include "libtorrent/aux_/disable_warnings_push.hpp"
|
||||
|
||||
#include "libtorrent/ed25519.hpp"
|
||||
|
||||
#ifndef ED25519_NO_SEED
|
||||
|
|
|
@ -1,3 +1,6 @@
|
|||
// ignore warnings in this file
|
||||
#include "libtorrent/aux_/disable_warnings_push.hpp"
|
||||
|
||||
/* LibTomCrypt, modular cryptographic library -- Tom St Denis
|
||||
*
|
||||
* LibTomCrypt is a library that provides various cryptographic
|
||||
|
|
|
@ -1,3 +1,6 @@
|
|||
// ignore warnings in this file
|
||||
#include "libtorrent/aux_/disable_warnings_push.hpp"
|
||||
|
||||
#include "libtorrent/ed25519.hpp"
|
||||
#include "sha512.h"
|
||||
#include "ge.h"
|
||||
|
|
|
@ -1,3 +1,6 @@
|
|||
// ignore warnings in this file
|
||||
#include "libtorrent/aux_/disable_warnings_push.hpp"
|
||||
|
||||
#include "libtorrent/ed25519.hpp"
|
||||
#include "sha512.h"
|
||||
#include "ge.h"
|
||||
|
|
|
@ -57,7 +57,11 @@ extern char const* libtorrent_assert_log;
|
|||
#include <sstream>
|
||||
#endif
|
||||
|
||||
TORRENT_EXPORT void assert_print(char const* fmt, ...);
|
||||
TORRENT_EXPORT void assert_print(char const* fmt, ...)
|
||||
#if defined __GNUC__ || defined __clang__
|
||||
__attribute__((format(printf, 1, 2)))
|
||||
#endif
|
||||
;
|
||||
|
||||
#if TORRENT_USE_ASSERTS || defined TORRENT_ASIO_DEBUGGING
|
||||
TORRENT_NO_RETURN
|
||||
|
|
|
@ -60,6 +60,7 @@ POSSIBILITY OF SUCH DAMAGE.
|
|||
#pragma clang diagnostic ignored "-Wweak-vtable"
|
||||
#pragma clang diagnostic ignored "-Wundef"
|
||||
#pragma clang diagnostic ignored "-Wshadow"
|
||||
#pragma clang diagnostic ignored "-Wimplicit-fallthrough"
|
||||
#endif
|
||||
|
||||
#ifdef _MSC_VER
|
||||
|
|
|
@ -94,7 +94,7 @@ namespace libtorrent
|
|||
last_job
|
||||
};
|
||||
|
||||
static char const* job_names[7];
|
||||
static char const* const job_names[7];
|
||||
};
|
||||
|
||||
char const* job_name(int j);
|
||||
|
@ -104,7 +104,7 @@ namespace libtorrent
|
|||
|
||||
#endif
|
||||
|
||||
extern const char* job_action_name[];
|
||||
extern const char* const job_action_name[];
|
||||
|
||||
struct TORRENT_EXTRA_EXPORT partial_hash
|
||||
{
|
||||
|
|
|
@ -48,6 +48,9 @@ namespace libtorrent
|
|||
}
|
||||
}
|
||||
|
||||
invariant_checker_impl(invariant_checker_impl const& rhs)
|
||||
: self(rhs.self) {}
|
||||
|
||||
~invariant_checker_impl()
|
||||
{
|
||||
TORRENT_TRY
|
||||
|
@ -61,6 +64,9 @@ namespace libtorrent
|
|||
}
|
||||
|
||||
T const& self;
|
||||
|
||||
private:
|
||||
invariant_checker_impl& operator=(invariant_checker_impl const&);
|
||||
};
|
||||
|
||||
template<class T>
|
||||
|
|
|
@ -38,6 +38,8 @@
|
|||
|
||||
------------------------------------------------------------------------ */
|
||||
|
||||
// ignore warnings in this file
|
||||
#include "libtorrent/aux_/disable_warnings_push.hpp"
|
||||
|
||||
#include "libtorrent/ConvertUTF.h"
|
||||
#ifdef CVTUTF_DEBUG
|
||||
|
|
|
@ -221,6 +221,9 @@ char const* libtorrent_assert_log = "asserts.log";
|
|||
boost::atomic<int> assert_counter(0);
|
||||
#endif
|
||||
|
||||
#if defined __GNUC__ || defined __clang__
|
||||
__attribute__((format(printf, 1, 2)))
|
||||
#endif
|
||||
TORRENT_EXPORT void assert_print(char const* fmt, ...)
|
||||
{
|
||||
#ifdef TORRENT_PRODUCTION_ASSERTS
|
||||
|
@ -296,6 +299,9 @@ TORRENT_NO_RETURN TORRENT_EXPORT void assert_fail(char const* expr, int line
|
|||
|
||||
#else
|
||||
|
||||
#if defined __GNUC__ || defined __clang__
|
||||
__attribute__((format(printf, 1, 2)))
|
||||
#endif
|
||||
TORRENT_EXPORT void assert_print(char const*, ...) {}
|
||||
TORRENT_EXPORT void assert_fail(char const*, int, char const*
|
||||
, char const*, char const*, int) {}
|
||||
|
|
|
@ -180,10 +180,8 @@ void log_refcounts(cached_piece_entry const* pe)
|
|||
}
|
||||
#endif
|
||||
|
||||
#if TORRENT_USE_ASSERTS
|
||||
|
||||
const char* job_action_name[] =
|
||||
{
|
||||
const char* const job_action_name[] =
|
||||
{
|
||||
"read",
|
||||
"write",
|
||||
"hash",
|
||||
|
@ -204,9 +202,11 @@ void log_refcounts(cached_piece_entry const* pe)
|
|||
"load_torrent",
|
||||
"clear_piece",
|
||||
"tick_storage",
|
||||
};
|
||||
};
|
||||
|
||||
char const* piece_log_t::job_names[7] =
|
||||
#if TORRENT_USE_ASSERTS
|
||||
|
||||
char const* const piece_log_t::job_names[7] =
|
||||
{
|
||||
"flushing",
|
||||
"flush_expired",
|
||||
|
|
|
@ -162,6 +162,7 @@ namespace libtorrent
|
|||
// more buffers to received data into
|
||||
void disk_buffer_pool::check_buffer_level(mutex::scoped_lock& l)
|
||||
{
|
||||
TORRENT_ASSERT(l.locked());
|
||||
if (!m_exceeded_max_size || m_in_use > m_low_watermark) return;
|
||||
|
||||
m_exceeded_max_size = false;
|
||||
|
@ -214,6 +215,8 @@ namespace libtorrent
|
|||
, mutex::scoped_lock& l) const
|
||||
{
|
||||
TORRENT_ASSERT(m_magic == 0x1337);
|
||||
TORRENT_ASSERT(l.locked());
|
||||
TORRENT_UNUSED(l);
|
||||
|
||||
#if TORRENT_HAVE_MMAP
|
||||
if (m_cache_pool)
|
||||
|
@ -325,6 +328,8 @@ namespace libtorrent
|
|||
{
|
||||
TORRENT_ASSERT(m_settings_set);
|
||||
TORRENT_ASSERT(m_magic == 0x1337);
|
||||
TORRENT_ASSERT(l.locked());
|
||||
TORRENT_UNUSED(l);
|
||||
|
||||
char* ret;
|
||||
#if TORRENT_HAVE_MMAP
|
||||
|
@ -601,6 +606,8 @@ namespace libtorrent
|
|||
TORRENT_ASSERT(m_magic == 0x1337);
|
||||
TORRENT_ASSERT(m_settings_set);
|
||||
TORRENT_ASSERT(is_disk_buffer(buf, l));
|
||||
TORRENT_ASSERT(l.locked());
|
||||
TORRENT_UNUSED(l);
|
||||
|
||||
#if TORRENT_USE_MLOCK
|
||||
if (m_lock_disk_cache)
|
||||
|
|
|
@ -401,6 +401,8 @@ routing_table::table_t::iterator routing_table::find_bucket(node_id const& id)
|
|||
return i;
|
||||
}
|
||||
|
||||
namespace {
|
||||
|
||||
bool compare_ip_cidr(node_entry const& lhs, node_entry const& rhs)
|
||||
{
|
||||
TORRENT_ASSERT(lhs.addr().is_v4() == rhs.addr().is_v4());
|
||||
|
@ -413,6 +415,8 @@ bool compare_ip_cidr(node_entry const& lhs, node_entry const& rhs)
|
|||
return dist <= cutoff;
|
||||
}
|
||||
|
||||
} // anonymous namespace
|
||||
|
||||
node_entry* routing_table::find_node(udp::endpoint const& ep
|
||||
, routing_table::table_t::iterator* bucket)
|
||||
{
|
||||
|
|
|
@ -287,8 +287,14 @@ namespace libtorrent
|
|||
m_path = path;
|
||||
}
|
||||
|
||||
void part_file::import_file(file& f, boost::int64_t offset, boost::int64_t size, error_code& ec)
|
||||
void part_file::import_file(file& f, boost::int64_t offset
|
||||
, boost::int64_t size, error_code& ec)
|
||||
{
|
||||
TORRENT_UNUSED(f);
|
||||
TORRENT_UNUSED(offset);
|
||||
TORRENT_UNUSED(size);
|
||||
TORRENT_UNUSED(ec);
|
||||
|
||||
// not implemented
|
||||
assert(false);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue