From 89b38d96c9e1dc45d6648268db28aec6e4d1fd8e Mon Sep 17 00:00:00 2001 From: mux Date: Sat, 21 Jun 2014 18:43:44 +0200 Subject: [PATCH] Add NORETURN to __fatal_error --- stmhal/main.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/stmhal/main.c b/stmhal/main.c index b74fa73186..7e3c5a7c6d 100644 --- a/stmhal/main.c +++ b/stmhal/main.c @@ -85,7 +85,7 @@ void flash_error(int n) { led_state(PYB_LED_R2, 0); } -void __fatal_error(const char *msg) { +void NORETURN __fatal_error(const char *msg) { for (volatile uint delay = 0; delay < 10000000; delay++) { } led_state(1, 1); @@ -115,7 +115,6 @@ void MP_WEAK __assert_func(const char *file, int line, const char *func, const c (void)func; printf("Assertion '%s' failed, at file %s:%d\n", expr, file, line); __fatal_error(""); - while (1); } #endif