fix some warnings
This commit is contained in:
parent
259e094316
commit
6a87dc7d84
12
src/asio.cpp
12
src/asio.cpp
|
@ -1,17 +1,14 @@
|
|||
// builds all boost.asio source as a separate compilation unit
|
||||
#include <boost/version.hpp>
|
||||
|
||||
#ifndef BOOST_ASIO_SOURCE
|
||||
#define BOOST_ASIO_SOURCE
|
||||
#endif
|
||||
|
||||
#include "libtorrent/config.hpp"
|
||||
|
||||
#define TORRENT_HAS_ASIO_DECL x ## BOOST_ASIO_DECL
|
||||
|
||||
// only define BOOST_ASIO_DECL if it hasn't already been defined
|
||||
// or if it has been defined to an empty string
|
||||
#if TORRENT_HAS_ASIO_DECL == x
|
||||
#define TORRENT_IS_EMPTY_IMPL(VAL) VAL ## 1
|
||||
#define TORRENT_IS_EMPTY(VAL) TORRENT_IS_EMPTY_IMPL(VAL)
|
||||
|
||||
#if !defined BOOST_ASIO_DECL || TORRENT_IS_EMPTY(BOOST_ASIO_DECL) == 1
|
||||
#ifdef BOOST_ASIO_DECL
|
||||
#undef BOOST_ASIO_DECL
|
||||
#endif
|
||||
|
@ -21,6 +18,7 @@
|
|||
#include "libtorrent/aux_/disable_warnings_push.hpp"
|
||||
|
||||
#if BOOST_VERSION >= 104500
|
||||
|
||||
#include <boost/asio/impl/src.hpp>
|
||||
#elif BOOST_VERSION >= 104400
|
||||
#include <boost/asio/impl/src.cpp>
|
||||
|
|
|
@ -187,6 +187,7 @@ socket_job::~socket_job() {}
|
|||
|
||||
void network_thread_pool::process_job(socket_job const& j, bool post)
|
||||
{
|
||||
TORRENT_UNUSED(post);
|
||||
if (j.type == socket_job::write_job)
|
||||
{
|
||||
TORRENT_ASSERT(j.peer->m_socket_is_writing);
|
||||
|
|
|
@ -92,6 +92,8 @@ void test_one_ip()
|
|||
for (int i = 0; i < 1000; ++i)
|
||||
{
|
||||
new_ip = ipv.cast_vote(addr2, 1, rand_v4());
|
||||
if (new_ip)
|
||||
fprintf(stderr, "unexpected new IP at iteration: %d\n", i);
|
||||
TEST_CHECK(!new_ip);
|
||||
new_ip = ipv.cast_vote(rand_v4(), 1, rand_v4());
|
||||
TEST_CHECK(!new_ip);
|
||||
|
|
Loading…
Reference in New Issue