fix some more warnings
This commit is contained in:
parent
4873004df7
commit
42fdd0f896
|
@ -71,7 +71,8 @@ extern char const* libtorrent_assert_log;
|
|||
|
||||
TORRENT_EXPORT void assert_print(char const* fmt, ...) TORRENT_FORMAT(1,2);
|
||||
|
||||
#if TORRENT_USE_ASSERTS || defined TORRENT_ASIO_DEBUGGING
|
||||
#if (TORRENT_USE_ASSERTS || defined TORRENT_ASIO_DEBUGGING) \
|
||||
&& !defined TORRENT_PRODUCTION_ASSERTS
|
||||
TORRENT_NO_RETURN
|
||||
#endif
|
||||
TORRENT_EXPORT void assert_fail(const char* expr, int line
|
||||
|
|
|
@ -33,6 +33,8 @@ POSSIBILITY OF SUCH DAMAGE.
|
|||
#include "libtorrent/config.hpp"
|
||||
#include "libtorrent/assert.hpp"
|
||||
|
||||
#include "libtorrent/aux_/disable_warnings_push.hpp"
|
||||
|
||||
#ifdef TORRENT_PRODUCTION_ASSERTS
|
||||
#include <boost/atomic.hpp>
|
||||
#endif
|
||||
|
@ -52,6 +54,8 @@ POSSIBILITY OF SUCH DAMAGE.
|
|||
#include <stdlib.h>
|
||||
#include <stdarg.h>
|
||||
|
||||
#include "libtorrent/aux_/disable_warnings_pop.hpp"
|
||||
|
||||
// uClibc++ doesn't have cxxabi.h
|
||||
#if defined __GNUC__ && __GNUC__ >= 3 \
|
||||
&& !defined __UCLIBCXX_MAJOR__
|
||||
|
@ -214,8 +218,10 @@ TORRENT_EXPORT void print_backtrace(char* out, int len, int max_depth)
|
|||
|
||||
#ifdef TORRENT_PRODUCTION_ASSERTS
|
||||
char const* libtorrent_assert_log = "asserts.log";
|
||||
namespace {
|
||||
// the number of asserts we've printed to the log
|
||||
boost::atomic<int> assert_counter(0);
|
||||
}
|
||||
#endif
|
||||
|
||||
TORRENT_FORMAT(1,2)
|
||||
|
@ -239,7 +245,10 @@ TORRENT_EXPORT void assert_print(char const* fmt, ...)
|
|||
#endif
|
||||
}
|
||||
|
||||
TORRENT_NO_RETURN TORRENT_EXPORT void assert_fail(char const* expr, int line
|
||||
#ifndef TORRENT_PRODUCTION_ASSERTS
|
||||
TORRENT_NO_RETURN
|
||||
#endif
|
||||
TORRENT_EXPORT void assert_fail(char const* expr, int line
|
||||
, char const* file, char const* function, char const* value, int kind)
|
||||
{
|
||||
#ifdef TORRENT_PRODUCTION_ASSERTS
|
||||
|
|
Loading…
Reference in New Issue