altos: add noreturn attribute to ao_panic
authorKeith Packard <keithp@keithp.com>
Thu, 6 Aug 2020 17:44:49 +0000 (10:44 -0700)
committerKeith Packard <keithp@keithp.com>
Sat, 8 Aug 2020 03:30:11 +0000 (20:30 -0700)
Signed-off-by: Keith Packard <keithp@keithp.com>
src/kernel/ao.h
src/product/ao_flash_task.c

index be663775e91fab86eb119d7690a67fb961c7e1ff..5df4903cdd0084c7a977ccb19c2ebb76d2587c01 100644 (file)
@@ -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
index a680ca181e7afd2771bc35f3d71ddab91fe3cbe8..bbd5675a1528ff7708bd38b8abc7d5380c47fbe6 100644 (file)
@@ -26,6 +26,7 @@ void
 ao_panic(uint8_t reason)
 {
        (void) reason;
+       for (;;);
 }
 
 void