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
This commit is contained in:
George Oikonomou 2013-08-09 15:36:30 +01:00
parent 20f06e3271
commit cb075dec65
2 changed files with 6 additions and 0 deletions

View file

@ -12,6 +12,9 @@ SEGMENT_RULES = $(OBJECTDIR)/segment.rules
CFLAGS += --model-$(MEMORY_MODEL) --stack-auto -DSDCC_CC2430 --std-c99 CFLAGS += --model-$(MEMORY_MODEL) --stack-auto -DSDCC_CC2430 --std-c99
CFLAGS += --fomit-frame-pointer 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 += --model-$(MEMORY_MODEL) --stack-auto -DSDCC_CC2430 --out-fmt-ihx
LDFLAGS += --xram-loc 0xE000 --xram-size 0x1F00 LDFLAGS += --xram-loc 0xE000 --xram-size 0x1F00
LDFLAGS += --code-loc $(START_ADDR) --code-size $(CODE_SIZE) LDFLAGS += --code-loc $(START_ADDR) --code-size $(CODE_SIZE)

View file

@ -18,6 +18,9 @@ CFLAGS += --model-$(MEMORY_MODEL) --stack-auto --std-c99
CFLAGS += -DCC2530_LAST_FLASH_BANK=$(HIGH_FLASH_BANK) CFLAGS += -DCC2530_LAST_FLASH_BANK=$(HIGH_FLASH_BANK)
CFLAGS += --fomit-frame-pointer 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 += --model-$(MEMORY_MODEL) --stack-auto --out-fmt-ihx
LDFLAGS += --xram-loc 0x0000 --xram-size 0x1F00 LDFLAGS += --xram-loc 0x0000 --xram-size 0x1F00
LDFLAGS += --code-loc $(START_ADDR) --code-size $(CODE_SIZE) LDFLAGS += --code-loc $(START_ADDR) --code-size $(CODE_SIZE)