mirror of
https://github.com/genodelabs/genode.git
synced 2025-01-18 18:56:29 +00:00
core: make ASSERT_NEVER_CALLED a single statement
This way, the macro can be used as a body of an if statement with no curly braces.
This commit is contained in:
parent
3a169d3a78
commit
437e6c5653
@ -18,8 +18,10 @@
|
||||
#include <base/log.h>
|
||||
|
||||
#define ASSERT_NEVER_CALLED \
|
||||
Genode::error("Unexpected call of '", __FUNCTION__, "' " \
|
||||
"(", __FILE__, ":", __LINE__, ")"); \
|
||||
for (;;); throw 0UL;
|
||||
do { \
|
||||
Genode::error("Unexpected call of '", __FUNCTION__, "' " \
|
||||
"(", __FILE__, ":", __LINE__, ")"); \
|
||||
for (;;); throw 0UL; \
|
||||
} while (false)
|
||||
|
||||
#endif /* _CORE__INCLUDE__ASSERTION_H_ */
|
||||
|
Loading…
Reference in New Issue
Block a user