25 #define ASSERTED ( ASSERTING && ( assertion_failures != 0 ) ) 49 #define assert( condition ) \ 51 if ( ASSERTING && ! (condition) ) { \ 52 assertion_failures++; \ 53 assert_printf ( "assert(%s) failed at %s line %d\n", \ 54 #condition, __FILE__, __LINE__ ); \ 65 #define static_assert(x) _Static_assert( x, #x ) 76 #define build_assert( condition ) \ 78 if ( ! (condition) ) { \ 79 extern void __attribute__ (( warning ( \ 80 "build_assert(" #condition ") failed" \ 81 ) )) _C2 ( build_assert_, __LINE__ ) ( void ); \ 82 _C2 ( build_assert_, __LINE__ ) (); \
int __attribute__((format(printf, 1, 2))) assert_printf(const char *fmt
printf() for assertions
int printf(const char *fmt,...)
Write a formatted string to the console.
unsigned int assertion_failures
Number of assertion failures triggered.
FILE_LICENCE(GPL2_OR_LATER_OR_UBDL)
int ssize_t const char * fmt