misc: assert: Expand to nothing when disabled
Make ASSERT macro expand to nothing when it is disabled during the build. Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
This commit is contained in:
parent
6e1f6e5d5d
commit
ca1641e319
@ -114,15 +114,11 @@ extern void posix_exit(int exit_code);
|
||||
#warning "__ASSERT() statements are ENABLED"
|
||||
#endif
|
||||
#else
|
||||
#define __ASSERT(test, fmt, ...) \
|
||||
do {/* nothing */ \
|
||||
} while (false)
|
||||
#define __ASSERT(test, fmt, ...) { }
|
||||
#define __ASSERT_EVAL(expr1, expr2, test, fmt, ...) expr1
|
||||
#endif
|
||||
#else
|
||||
#define __ASSERT(test, fmt, ...) \
|
||||
do {/* nothing */ \
|
||||
} while (false)
|
||||
#define __ASSERT(test, fmt, ...) { }
|
||||
#define __ASSERT_EVAL(expr1, expr2, test, fmt, ...) expr1
|
||||
#endif
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user