Browse Source

misc: Build with no strict aliasing to avoid compiler warnings

I have not looked at the change in binary size but it seems to
be fine and still works on the device.

nandboot.c:61:3: warning: dereferencing type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing]
   magicNum = *((uint32_t *) nand_header);
   ^
nand.c:800:5: warning: dereferencing type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing]
     uart_send_hexnum(*((uint32_t *) &read_buf[k]), 8);
master
Holger Hans Peter Freyther 7 years ago
parent
commit
de83b50dec
  1. 2
      Makefile

2
Makefile

@ -48,7 +48,7 @@ ifneq ($(OLDBOARD),$(BOARD))
$(shell echo "$(BOARD)" > config.h)
endif
CFLAGS += -D${PLATFORM} -D${FLASH_TYPE} -Dboard_$(BOARD) -DENABLE_BOOT_INTERRUPT
CFLAGS += -D${PLATFORM} -D${FLASH_TYPE} -Dboard_$(BOARD) -DENABLE_BOOT_INTERRUPT -fno-strict-aliasing
# Processor type setup
# The Instruction and Data accesses are differentiated via accessing different

Loading…
Cancel
Save