From 854f029fc151d8ee66d5efc7f07534b00ded6ff2 Mon Sep 17 00:00:00 2001 From: Arvid Norberg Date: Wed, 30 Jul 2008 06:41:05 +0000 Subject: [PATCH] fixed warning on gcc 4.3 --- include/libtorrent/assert.hpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/libtorrent/assert.hpp b/include/libtorrent/assert.hpp index 6943fadc2..6396526ba 100644 --- a/include/libtorrent/assert.hpp +++ b/include/libtorrent/assert.hpp @@ -42,7 +42,7 @@ std::string demangle(char const* name); #if (defined __linux__ || defined __MACH__) && defined __GNUC__ && !defined(NDEBUG) TORRENT_EXPORT void assert_fail(const char* expr, int line, char const* file, char const* function); -#define TORRENT_ASSERT(x) if (x) {} else assert_fail(#x, __LINE__, __FILE__, __PRETTY_FUNCTION__) +#define TORRENT_ASSERT(x) do { if (x) {} else assert_fail(#x, __LINE__, __FILE__, __PRETTY_FUNCTION__); } while (false) #else #include