re-enable some warnings and fix code
This commit is contained in:
parent
721a607593
commit
4df1ecbe25
6
Jamfile
6
Jamfile
|
@ -234,11 +234,11 @@ rule warnings ( properties * )
|
|||
result += <cflags>-Wno-padded ;
|
||||
result += <cflags>-Wno-global-constructors ;
|
||||
result += <cxxflags>-Wno-c++98-compat ;
|
||||
# this warns on any global static object, which are used for error_category
|
||||
# objects
|
||||
result += <cflags>-Wno-exit-time-destructors ;
|
||||
result += <cflags>-Wno-documentation-unknown-command ;
|
||||
result += <cflags>-Wno-disabled-macro-expansion ;
|
||||
result += <cflags>-Wno-unused-command-line-argument ;
|
||||
result += <cflags>-Wno-error=implicit-fallthrough ;
|
||||
result += <cflags>-Wno-implicit-fallthrough ;
|
||||
result += <cflags>-Wno-c++11-long-long ;
|
||||
result += <cflags>-Wno-variadic-macros ;
|
||||
|
||||
|
|
|
@ -47,6 +47,7 @@ POSSIBILITY OF SUCH DAMAGE.
|
|||
|
||||
#ifdef __clang__
|
||||
#pragma clang diagnostic push
|
||||
#pragma clang diagnostic ignored "-Wunknown-pragmas"
|
||||
#pragma clang diagnostic ignored "-Wall"
|
||||
#pragma clang diagnostic ignored "-Weverything"
|
||||
#pragma clang diagnostic ignored "-Wsign-conversion"
|
||||
|
@ -70,6 +71,10 @@ POSSIBILITY OF SUCH DAMAGE.
|
|||
#pragma clang diagnostic ignored "-Wunused-parameter"
|
||||
#pragma clang diagnostic ignored "-Wreserved-id-macro"
|
||||
#pragma clang diagnostic ignored "-Wunused-local-typedef"
|
||||
#pragma clang diagnostic ignored "-Wdouble-promotion"
|
||||
#pragma clang diagnostic ignored "-Wdisabled-macro-expansion"
|
||||
#pragma clang diagnostic ignored "-Wexit-time-destructors"
|
||||
#pragma clang diagnostic ignored "-Wdocumentation-unknown-command"
|
||||
#endif
|
||||
|
||||
#ifdef _MSC_VER
|
||||
|
|
|
@ -38,7 +38,10 @@ POSSIBILITY OF SUCH DAMAGE.
|
|||
#include <assert.h>
|
||||
#include <cstring>
|
||||
#include <limits>
|
||||
|
||||
#include "libtorrent/aux_/disable_warnings_push.hpp"
|
||||
#include <boost/cstdint.hpp>
|
||||
#include "libtorrent/aux_/disable_warnings_pop.hpp"
|
||||
|
||||
#include "libtorrent/invariant_check.hpp"
|
||||
#include "libtorrent/config.hpp"
|
||||
|
|
|
@ -37,7 +37,9 @@ POSSIBILITY OF SUCH DAMAGE.
|
|||
|
||||
#ifdef __clang__
|
||||
#pragma clang diagnostic push
|
||||
#pragma clang diagnostic ignored "-Wunknown-pragmas"
|
||||
#pragma clang diagnostic ignored "-Wunused-macros"
|
||||
#pragma clang diagnostic ignored "-Wreserved-id-macro"
|
||||
#endif
|
||||
|
||||
// these defines are just in case the system we're on needs them for 64 bit file
|
||||
|
@ -141,8 +143,6 @@ POSSIBILITY OF SUCH DAMAGE.
|
|||
|
||||
#endif
|
||||
|
||||
#undef _FILE_OFFSET_BITS
|
||||
|
||||
// make sure the _FILE_OFFSET_BITS define worked
|
||||
// on this platform. It's supposed to make file
|
||||
// related functions support 64-bit offsets.
|
||||
|
|
|
@ -77,9 +77,9 @@ namespace libtorrent { namespace dht
|
|||
if (match->count == m_message_rate_limit * 10)
|
||||
{
|
||||
#ifndef TORRENT_DISABLE_LOGGING
|
||||
logger->log(dht_logger::tracker, "BANNING PEER [ ip: %s time: %f count: %d ]"
|
||||
logger->log(dht_logger::tracker, "BANNING PEER [ ip: %s time: %d ms count: %d ]"
|
||||
, print_address(addr).c_str()
|
||||
, total_milliseconds((now - match->limit) + seconds(10)) / 1000.f
|
||||
, int(total_milliseconds((now - match->limit) + seconds(10)))
|
||||
, int(match->count));
|
||||
#endif
|
||||
// we've received too many messages in less than 10 seconds
|
||||
|
|
Loading…
Reference in New Issue