altos: Add pragma to eliminate unreachable code warning on SDCC
authorKeith Packard <keithp@keithp.com>
Sun, 28 Aug 2011 22:43:32 +0000 (15:43 -0700)
committerKeith Packard <keithp@keithp.com>
Sun, 28 Aug 2011 22:43:32 +0000 (15:43 -0700)
This pragma was removed as GCC doesn't support it; make it conditional
on SDCC so that we eliminate a warning message.

Signed-off-by: Keith Packard <keithp@keithp.com>
src/core/ao_panic.c

index b6ff65cccd9f18e46263407cc6d047fcfcf8ee7c..244917a8af9a32a44c0bc1bc756bee7f00750f90 100644 (file)
@@ -58,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);