Commit 4e54c876 authored by stijn's avatar stijn
Browse files

Add -Wpointer-arith flag to prevent problems with pointer arithmetic on void*

parent ccedf000
......@@ -14,7 +14,7 @@ INC += -I$(PY_SRC)
INC += -I$(BUILD)
CFLAGS_CORTEX_M3 = -mthumb -mcpu=cortex-m3
CFLAGS = $(INC) -Wall -Werror -ansi -std=gnu99 $(CFLAGS_CORTEX_M3) $(COPT) \
CFLAGS = $(INC) -Wall -Wpointer-arith -Werror -ansi -std=gnu99 $(CFLAGS_CORTEX_M3) $(COPT) \
-flto -ffunction-sections -fdata-sections
#Debugging/Optimization
......
......@@ -42,7 +42,7 @@ INC += -I$(USBDEV_DIR)/core/inc -I$(USBDEV_DIR)/class/cdc_msc_hid/inc
INC += -I$(FATFS_DIR)/src
CFLAGS_CORTEX_M4 = -mthumb -mtune=cortex-m4 -mabi=aapcs-linux -mcpu=cortex-m4 -mfpu=fpv4-sp-d16 -mfloat-abi=hard -fsingle-precision-constant -Wdouble-promotion
CFLAGS = $(INC) -Wall -Werror -ansi -std=gnu99 -nostdlib $(CFLAGS_MOD) $(CFLAGS_CORTEX_M4) $(COPT)
CFLAGS = $(INC) -Wall -Wpointer-arith -Werror -ansi -std=gnu99 -nostdlib $(CFLAGS_MOD) $(CFLAGS_CORTEX_M4) $(COPT)
CFLAGS += -Iboards/$(BOARD)
LDFLAGS = -nostdlib -T stm32f405.ld -Map=$(@:.elf=.map) --cref
......
......@@ -35,7 +35,7 @@ INC += -I../stmhal
INC += -I$(BUILD)
INC += -Icore
CFLAGS = $(INC) -Wall -ansi -std=gnu99 -nostdlib $(CFLAGS_CORTEX_M4)
CFLAGS = $(INC) -Wall -Wpointer-arith -ansi -std=gnu99 -nostdlib $(CFLAGS_CORTEX_M4)
LDFLAGS = -nostdlib -T mk20dx256.ld -msoft-float -mfloat-abi=soft
ifeq ($(USE_ARDUINO_TOOLCHAIN),1)
......
......@@ -11,7 +11,7 @@ INC += -I$(PY_SRC)
INC += -I$(BUILD)
# compiler settings
CFLAGS = $(INC) -Wall -Werror -ansi -std=gnu99 -DUNIX
CFLAGS = $(INC) -Wall -Wpointer-arith -Werror -ansi -std=gnu99 -DUNIX
LDFLAGS = -lm
# Debugging/Optimization
......
......@@ -18,7 +18,7 @@ INC += -I$(PY_SRC)
INC += -I$(BUILD)
# compiler settings
CWARN = -Wall -Werror
CWARN = -Wall -Wpointer-arith -Werror
CFLAGS = $(INC) $(CWARN) -ansi -std=gnu99 -DUNIX $(CFLAGS_MOD) $(COPT) $(CFLAGS_EXTRA)
# Debugging/Optimization
......
......@@ -15,7 +15,7 @@ INC += -I$(PY_SRC)
INC += -I$(BUILD)
# compiler settings
CFLAGS = $(INC) -Wall -Werror -ansi -std=gnu99 -DUNIX $(CFLAGS_MOD) $(COPT)
CFLAGS = $(INC) -Wall -Wpointer-arith -Werror -ansi -std=gnu99 -DUNIX $(CFLAGS_MOD) $(COPT)
LDFLAGS = $(LDFLAGS_MOD) -lm
ifeq ($(CROSS_COMPILE),i686-w64-mingw32-)
CFLAGS += -D__USE_MINGW_ANSI_STDIO=1
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment