mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 09:37:34 +00:00
LibC: Make sure assert() expands to *something* in non-DEBUG builds
Sometimes people write strange things like "assert(x), something();" and this will not work if "assert(x)" expands to "". So make it expand to ((void)0) instead.
This commit is contained in:
parent
797904bafd
commit
9ba9228a6b
1 changed files with 1 additions and 1 deletions
|
@ -41,7 +41,7 @@ __attribute__((noreturn)) void __assertion_failed(const char* msg);
|
||||||
} while (0)
|
} while (0)
|
||||||
# define ASSERT_NOT_REACHED() assert(false)
|
# define ASSERT_NOT_REACHED() assert(false)
|
||||||
#else
|
#else
|
||||||
# define assert(expr)
|
# define assert(expr) ((void)0)
|
||||||
# define ASSERT_NOT_REACHED() CRASH()
|
# define ASSERT_NOT_REACHED() CRASH()
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue