From cb075dec65eb131eb46ef78e8512c642bb72f3e0 Mon Sep 17 00:00:00 2001 From: George Oikonomou Date: Fri, 9 Aug 2013 15:36:30 +0100 Subject: [PATCH] Disable SDCC warnings 110 and 126 Those two warnings are optimisation-related * 110 warns that an always-false if branch has been optimised out * 126 warns about unreachable code which also gets optimised out In disabling those warnings, we make the build less cluttered --- cpu/cc2430/Makefile.cc2430 | 3 +++ cpu/cc253x/Makefile.cc253x | 3 +++ 2 files changed, 6 insertions(+) diff --git a/cpu/cc2430/Makefile.cc2430 b/cpu/cc2430/Makefile.cc2430 index 34f5743be..2a8209129 100644 --- a/cpu/cc2430/Makefile.cc2430 +++ b/cpu/cc2430/Makefile.cc2430 @@ -12,6 +12,9 @@ SEGMENT_RULES = $(OBJECTDIR)/segment.rules CFLAGS += --model-$(MEMORY_MODEL) --stack-auto -DSDCC_CC2430 --std-c99 CFLAGS += --fomit-frame-pointer +### Disable warning 110 (EVELYN the modified dog) and 126 (unreachable code) +CFLAGS += --disable-warning 110 --disable-warning 126 + LDFLAGS += --model-$(MEMORY_MODEL) --stack-auto -DSDCC_CC2430 --out-fmt-ihx LDFLAGS += --xram-loc 0xE000 --xram-size 0x1F00 LDFLAGS += --code-loc $(START_ADDR) --code-size $(CODE_SIZE) diff --git a/cpu/cc253x/Makefile.cc253x b/cpu/cc253x/Makefile.cc253x index edb6f1bf5..25f993df9 100644 --- a/cpu/cc253x/Makefile.cc253x +++ b/cpu/cc253x/Makefile.cc253x @@ -18,6 +18,9 @@ CFLAGS += --model-$(MEMORY_MODEL) --stack-auto --std-c99 CFLAGS += -DCC2530_LAST_FLASH_BANK=$(HIGH_FLASH_BANK) CFLAGS += --fomit-frame-pointer +### Disable warning 110 (EVELYN the modified dog) and 126 (unreachable code) +CFLAGS += --disable-warning 110 --disable-warning 126 + LDFLAGS += --model-$(MEMORY_MODEL) --stack-auto --out-fmt-ihx LDFLAGS += --xram-loc 0x0000 --xram-size 0x1F00 LDFLAGS += --code-loc $(START_ADDR) --code-size $(CODE_SIZE)