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 b6ff65c..244917a 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);