commit | eb7848a1df28cf830178960704a69c5aa8fca970 | [log] [tgz] |
---|---|---|
author | Thiago Macieira <thiago.macieira@intel.com> | Tue Oct 24 21:39:21 2017 -0700 |
committer | Andrew Boie <andrewboie@gmail.com> | Wed Oct 25 10:43:38 2017 -0700 |
tree | 89ce05c30a04e7b0d6d37f5736798fcb4059ae87 | |
parent | f677caef2dfff2d7ab9f69da2485594b28e06e11 [diff] |
libc: Make no-debug assert() conform to C requirements The C standard requires assert() to be a void result, so you could write something like: return assert(x), x; From the C11 standard (7.2 Diagnostic <assert.h>): > If NDEBUG is defined as a macro name at the point in the source file > where <assert.h> is included, the assert macro is defined simply as > #define assert(ignore) ((void)0) Signed-off-by: Thiago Macieira <thiago.macieira@intel.com>