diff --git a/repos/base/src/core/include/assertion.h b/repos/base/src/core/include/assertion.h index 372ca60c5f..ec9ccc6e67 100644 --- a/repos/base/src/core/include/assertion.h +++ b/repos/base/src/core/include/assertion.h @@ -18,8 +18,10 @@ #include #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_ */