From 9df66f7589b663899e2c729b884eed4b64e5d4da Mon Sep 17 00:00:00 2001 From: Keith Packard Date: Thu, 6 Aug 2020 10:44:49 -0700 Subject: [PATCH] altos: add noreturn attribute to ao_panic Signed-off-by: Keith Packard --- src/kernel/ao.h | 2 +- src/product/ao_flash_task.c | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/src/kernel/ao.h b/src/kernel/ao.h index be663775..5df4903c 100644 --- a/src/kernel/ao.h +++ b/src/kernel/ao.h @@ -86,7 +86,7 @@ typedef AO_PORT_TYPE ao_port_t; /* Stop the operating system, beeping and blinking the reason */ void -ao_panic(uint8_t reason); +ao_panic(uint8_t reason) __attribute__((noreturn)); /* * ao_romconfig.c diff --git a/src/product/ao_flash_task.c b/src/product/ao_flash_task.c index a680ca18..bbd5675a 100644 --- a/src/product/ao_flash_task.c +++ b/src/product/ao_flash_task.c @@ -26,6 +26,7 @@ void ao_panic(uint8_t reason) { (void) reason; + for (;;); } void -- 2.30.2