Fix MBED_ASSERT for UTs

For UTs mbed_assert_internal should not be declared as MBED_NORETURN
as UT stub for mbed_assert_internal only prints out the assert trace
and returns back to original code.
pull/11132/head
Kimmo Vaisanen 2019-07-31 15:06:28 +03:00
parent 417a9fe2fb
commit 882c21bf0b
1 changed files with 6 additions and 2 deletions

View File

@ -39,7 +39,12 @@ extern "C" {
* @param file File where assertation failed.
* @param line Failing assertation line number.
*/
MBED_NORETURN void mbed_assert_internal(const char *expr, const char *file, int line);
// mbed_assert_internal UT stub only prints an assert trace and returns, so therefore
// MBED_NORETURN must not be defined for UTs.
#ifndef UNITTEST
MBED_NORETURN
#endif
void mbed_assert_internal(const char *expr, const char *file, int line);
#ifdef __cplusplus
}
@ -132,4 +137,3 @@ do { \
/**@}*/
/**@}*/