altos: Add pragma to eliminate unreachable code warning on SDCC
[fw/altos] / src / core / ao_panic.c
index 0668dad26bb3c6e4bcecae1dee87a85b9796dde8..244917a8af9a32a44c0bc1bc756bee7f00750f90 100644 (file)
 #if !HAS_BEEP
 #define ao_beep(x)
 #endif
+#if !LEDS_AVAILABLE
+#define ao_led_on(x)
+#define ao_led_off(x)
+#endif
 
 static void
 ao_panic_delay(uint8_t n)
@@ -54,6 +58,9 @@ ao_panic(uint8_t reason)
                ao_beep(AO_BEEP_OFF);
                ao_panic_delay(2);
 
+#ifdef SDCC
+#pragma disable_warning 126
+#endif
                for (n = 0; n < reason; n++) {
                        ao_led_on(AO_LED_RED);
                        ao_beep(AO_BEEP_MID);