mirror of https://github.com/Icinga/icinga2.git
Fix the ASSERT() macro.
This commit is contained in:
parent
e93808a468
commit
1de88b0559
|
@ -24,11 +24,7 @@
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
|
|
||||||
#ifdef NDEBUG
|
#ifdef NDEBUG
|
||||||
# if defined(__clang__) || (__GNUC__ > 4) || (__GNUC__ == 4 && __GNUC_MINOR__ >= 5)
|
# define ASSERT(expr) ((void)0)
|
||||||
# define ASSERT(expr) __builtin_unreachable()
|
|
||||||
# else
|
|
||||||
# define ASSERT(expr) ((void)0)
|
|
||||||
# endif
|
|
||||||
#else /* NDEBUG */
|
#else /* NDEBUG */
|
||||||
# define ASSERT(expr) ((expr) ? 0 : icinga_assert_fail(#expr, __FILE__, __LINE__))
|
# define ASSERT(expr) ((expr) ? 0 : icinga_assert_fail(#expr, __FILE__, __LINE__))
|
||||||
#endif /* NDEBUG */
|
#endif /* NDEBUG */
|
||||||
|
|
Loading…
Reference in New Issue