From de83b50decd9facf8f947a7fba4b6945197f8d06 Mon Sep 17 00:00:00 2001 From: Holger Hans Peter Freyther Date: Thu, 20 Nov 2014 18:38:32 +0100 Subject: [PATCH] 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); --- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile b/Makefile index c6ef369..7855476 100644 --- a/Makefile +++ b/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