clean up usage of printf attribute (encapsulate it in a macro)

This commit is contained in:
Arvid Norberg
2015-05-10 05:11:51 +00:00
parent b60934288b
commit 1357fd5265
15 changed files with 26 additions and 82 deletions

View File

@@ -221,9 +221,7 @@ 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_FORMAT(1,2)
TORRENT_EXPORT void assert_print(char const* fmt, ...)
{
#ifdef TORRENT_PRODUCTION_ASSERTS
@@ -299,9 +297,7 @@ 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_FORMAT(1,2)
TORRENT_EXPORT void assert_print(char const*, ...) {}
TORRENT_EXPORT void assert_fail(char const*, int, char const*
, char const*, char const*, int) {}