Skip to content

Commit 89b38d9

Browse files
committed
Add NORETURN to __fatal_error
1 parent 5c8db48 commit 89b38d9

1 file changed

Lines changed: 1 addition & 2 deletions

File tree

stmhal/main.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ void flash_error(int n) {
8585
led_state(PYB_LED_R2, 0);
8686
}
8787

88-
void __fatal_error(const char *msg) {
88+
void NORETURN __fatal_error(const char *msg) {
8989
for (volatile uint delay = 0; delay < 10000000; delay++) {
9090
}
9191
led_state(1, 1);
@@ -115,7 +115,6 @@ void MP_WEAK __assert_func(const char *file, int line, const char *func, const c
115115
(void)func;
116116
printf("Assertion '%s' failed, at file %s:%d\n", expr, file, line);
117117
__fatal_error("");
118-
while (1);
119118
}
120119
#endif
121120

0 commit comments

Comments
 (0)