From b0233ae6fbf066a26667be713839887f73dc6ece Mon Sep 17 00:00:00 2001 From: Piotr Esden-Tempski Date: Tue, 26 Feb 2013 16:42:20 -0800 Subject: [PATCH] Added more warning CFLAGS to all makefiles. --- examples/lm3s/Makefile.include | 6 +++++- examples/lm4f/Makefile.include | 6 +++++- examples/lpc13xx/Makefile.include | 6 +++++- examples/lpc17xx/Makefile.include | 6 +++++- examples/lpc43xx/Makefile.include | 6 +++++- examples/stm32/f1/Makefile.include | 6 +++++- examples/stm32/f2/Makefile.include | 6 +++++- examples/stm32/f4/Makefile.include | 6 +++++- examples/stm32/l1/Makefile.include | 6 +++++- lib/efm32/efm32g/Makefile | 6 +++++- lib/efm32/efm32gg/Makefile | 6 +++++- lib/efm32/efm32lg/Makefile | 6 +++++- lib/efm32/efm32tg/Makefile | 6 +++++- lib/lm3s/Makefile | 6 +++++- lib/lm4f/Makefile | 6 +++++- lib/lpc13xx/Makefile | 6 +++++- lib/lpc17xx/Makefile | 6 +++++- lib/lpc43xx/Makefile | 6 +++++- lib/stm32/f1/Makefile | 6 +++++- lib/stm32/f2/Makefile | 6 +++++- lib/stm32/f4/Makefile | 6 +++++- lib/stm32/l1/Makefile | 6 +++++- 22 files changed, 110 insertions(+), 22 deletions(-) diff --git a/examples/lm3s/Makefile.include b/examples/lm3s/Makefile.include index c9bd33ca..c698f0c1 100644 --- a/examples/lm3s/Makefile.include +++ b/examples/lm3s/Makefile.include @@ -36,7 +36,11 @@ $(info We seem to be building the example in the source directory. Using local l endif endif -CFLAGS += -O0 -g3 -Wall -Wextra -I$(TOOLCHAIN_DIR)/include -fno-common \ +CFLAGS += -O0 -g3 \ + -Wall -Wextra -Wimplicit-function-declaration \ + -Wredundant-decls -Wmissing-prototypes -Wstrict-prototypes \ + -Wundef -Wshadow \ + -I$(TOOLCHAIN_DIR)/include -fno-common \ -mcpu=cortex-m3 -mthumb -MD -DLM3S LDSCRIPT ?= $(BINARY).ld LDFLAGS += -L$(TOOLCHAIN_DIR)/lib \ diff --git a/examples/lm4f/Makefile.include b/examples/lm4f/Makefile.include index 60987e8d..91511cee 100644 --- a/examples/lm4f/Makefile.include +++ b/examples/lm4f/Makefile.include @@ -37,7 +37,11 @@ endif endif ARCH_FLAGS = -mthumb -mcpu=cortex-m4 -mfloat-abi=hard -mfpu=fpv4-sp-d16 -CFLAGS += -O0 -g3 -Wall -Wextra -I$(TOOLCHAIN_DIR)/include \ +CFLAGS += -O0 -g3 \ + -Wall -Wextra -Wimplicit-function-declaration \ + -Wredundant-decls -Wmissing-prototypes -Wstrict-prototypes \ + -Wundef -Wshadow \ + -I$(TOOLCHAIN_DIR)/include \ -fno-common $(ARCH_FLAGS) -MD -DLM4F LDSCRIPT ?= $(BINARY).ld LDFLAGS += --static -Wl,--start-group -lc -lgcc -lnosys -Wl,--end-group \ diff --git a/examples/lpc13xx/Makefile.include b/examples/lpc13xx/Makefile.include index 0b220638..049382fa 100644 --- a/examples/lpc13xx/Makefile.include +++ b/examples/lpc13xx/Makefile.include @@ -36,7 +36,11 @@ $(info We seem to be building the example in the source directory. Using local l endif endif -CFLAGS += -Os -g -Wall -Wextra -I$(TOOLCHAIN_DIR)/include -fno-common \ +CFLAGS += -Os -g \ + -Wall -Wextra -Wimplicit-function-declaration \ + -Wredundant-decls -Wmissing-prototypes -Wstrict-prototypes \ + -Wundef -Wshadow \ + -I$(TOOLCHAIN_DIR)/include -fno-common \ -mcpu=cortex-m3 -mthumb -MD -DLPC13XX LDSCRIPT ?= $(BINARY).ld LDFLAGS += -L$(TOOLCHAIN_DIR)/lib \ diff --git a/examples/lpc17xx/Makefile.include b/examples/lpc17xx/Makefile.include index 9c38a68d..0a290417 100644 --- a/examples/lpc17xx/Makefile.include +++ b/examples/lpc17xx/Makefile.include @@ -36,7 +36,11 @@ $(info We seem to be building the example in the source directory. Using local l endif endif -CFLAGS += -O0 -g -Wall -Wextra -I$(TOOLCHAIN_DIR)/include -fno-common \ +CFLAGS += -O0 -g \ + -Wall -Wextra -Wimplicit-function-declaration \ + -Wredundant-decls -Wmissing-prototypes -Wstrict-prototypes \ + -Wundef -Wshadow \ + -I$(TOOLCHAIN_DIR)/include -fno-common \ -mcpu=cortex-m3 -mthumb -MD -DLPC17XX LDSCRIPT ?= $(BINARY).ld LDFLAGS += -L$(TOOLCHAIN_DIR)/lib \ diff --git a/examples/lpc43xx/Makefile.include b/examples/lpc43xx/Makefile.include index cf78538f..10121a95 100644 --- a/examples/lpc43xx/Makefile.include +++ b/examples/lpc43xx/Makefile.include @@ -39,7 +39,11 @@ $(info We seem to be building the example in the source directory. Using local l endif endif -CFLAGS += -O2 -g -Wall -Wextra -I$(TOOLCHAIN_DIR)/include -fno-common \ +CFLAGS += -O2 -g \ + -Wall -Wextra -Wimplicit-function-declaration \ + -Wredundant-decls -Wmissing-prototypes -Wstrict-prototypes \ + -Wundef -Wshadow \ + -I$(TOOLCHAIN_DIR)/include -fno-common \ -mcpu=cortex-m4 -mthumb -MD \ -mfloat-abi=hard -mfpu=fpv4-sp-d16 -DLPC43XX LDSCRIPT ?= $(BINARY).ld diff --git a/examples/stm32/f1/Makefile.include b/examples/stm32/f1/Makefile.include index 2ae9e27e..faf78993 100644 --- a/examples/stm32/f1/Makefile.include +++ b/examples/stm32/f1/Makefile.include @@ -38,7 +38,11 @@ endif endif ARCH_FLAGS = -mthumb -mcpu=cortex-m3 -msoft-float -CFLAGS += -Os -g -Wall -Wextra -I$(TOOLCHAIN_DIR)/include \ +CFLAGS += -Os -g \ + -Wall -Wextra -Wimplicit-function-declaration \ + -Wredundant-decls -Wmissing-prototypes -Wstrict-prototypes \ + -Wundef -Wshadow \ + -I$(TOOLCHAIN_DIR)/include \ -fno-common $(ARCH_FLAGS) -MD -DSTM32F1 LDSCRIPT ?= $(BINARY).ld LDFLAGS += --static -Wl,--start-group -lc -lgcc -lnosys -Wl,--end-group \ diff --git a/examples/stm32/f2/Makefile.include b/examples/stm32/f2/Makefile.include index 10eed796..e8fea099 100644 --- a/examples/stm32/f2/Makefile.include +++ b/examples/stm32/f2/Makefile.include @@ -38,7 +38,11 @@ $(info We seem to be building the example in the source directory. Using local l endif endif -CFLAGS += -Os -g -Wall -Wextra -I$(TOOLCHAIN_DIR)/include \ +CFLAGS += -Os -g \ + -Wall -Wextra -Wimplicit-function-declaration \ + -Wredundant-decls -Wmissing-prototypes -Wstrict-prototypes \ + -Wundef -Wshadow \ + -I$(TOOLCHAIN_DIR)/include \ -fno-common -mcpu=cortex-m3 -mthumb -msoft-float -MD -DSTM32F2 LDSCRIPT ?= $(BINARY).ld LDFLAGS += --static -Wl,--start-group -lc -lgcc -lnosys -Wl,--end-group \ diff --git a/examples/stm32/f4/Makefile.include b/examples/stm32/f4/Makefile.include index 815f3759..ede4288a 100644 --- a/examples/stm32/f4/Makefile.include +++ b/examples/stm32/f4/Makefile.include @@ -39,7 +39,11 @@ $(info We seem to be building the example in the source directory. Using local l endif endif -CFLAGS += -Os -g -Wall -Wextra -I$(TOOLCHAIN_DIR)/include \ +CFLAGS += -Os -g \ + -Wall -Wextra -Wimplicit-function-declaration \ + -Wredundant-decls -Wmissing-prototypes -Wstrict-prototypes \ + -Wundef -Wshadow \ + -I$(TOOLCHAIN_DIR)/include \ -fno-common -mcpu=cortex-m4 -mthumb \ -mfloat-abi=hard -mfpu=fpv4-sp-d16 -MD -DSTM32F4 LDSCRIPT ?= $(BINARY).ld diff --git a/examples/stm32/l1/Makefile.include b/examples/stm32/l1/Makefile.include index 57b70303..e65cdb52 100644 --- a/examples/stm32/l1/Makefile.include +++ b/examples/stm32/l1/Makefile.include @@ -38,7 +38,11 @@ endif endif ARCH_FLAGS = -mthumb -mcpu=cortex-m3 -msoft-float -CFLAGS += -Os -g -Wall -Wextra -I$(TOOLCHAIN_DIR)/include \ +CFLAGS += -Os -g \ + -Wall -Wextra -Wimplicit-function-declaration \ + -Wredundant-decls -Wmissing-prototypes -Wstrict-prototypes \ + -Wundef -Wshadow \ + -I$(TOOLCHAIN_DIR)/include \ -fno-common $(ARCH_FLAGS) -MD -DSTM32L1 LDSCRIPT ?= $(BINARY).ld LDFLAGS += --static -Wl,--start-group -lc -lgcc -lnosys -Wl,--end-group \ diff --git a/lib/efm32/efm32g/Makefile b/lib/efm32/efm32g/Makefile index 1dd44850..4eb4cdb7 100644 --- a/lib/efm32/efm32g/Makefile +++ b/lib/efm32/efm32g/Makefile @@ -25,7 +25,11 @@ PREFIX ?= arm-none-eabi #PREFIX ?= arm-elf CC = $(PREFIX)-gcc AR = $(PREFIX)-ar -CFLAGS = -Os -g -Wall -Wextra -I../../../include -fno-common \ +CFLAGS = -Os -g \ + -Wall -Wextra -Wimplicit-function-declaration \ + -Wredundant-decls -Wmissing-prototypes -Wstrict-prototypes \ + -Wundef -Wshadow \ + -I../../../include -fno-common \ -mcpu=cortex-m3 -mthumb -Wstrict-prototypes \ -ffunction-sections -fdata-sections -MD -D$(FAMILY) # ARFLAGS = rcsv diff --git a/lib/efm32/efm32gg/Makefile b/lib/efm32/efm32gg/Makefile index 24078592..3461076e 100644 --- a/lib/efm32/efm32gg/Makefile +++ b/lib/efm32/efm32gg/Makefile @@ -25,7 +25,11 @@ PREFIX ?= arm-none-eabi #PREFIX ?= arm-elf CC = $(PREFIX)-gcc AR = $(PREFIX)-ar -CFLAGS = -Os -g -Wall -Wextra -I../../../include -fno-common \ +CFLAGS = -Os -g \ + -Wall -Wextra -Wimplicit-function-declaration \ + -Wredundant-decls -Wmissing-prototypes -Wstrict-prototypes \ + -Wundef -Wshadow \ + -I../../../include -fno-common \ -mcpu=cortex-m3 -mthumb -Wstrict-prototypes \ -ffunction-sections -fdata-sections -MD -D$(FAMILY) # ARFLAGS = rcsv diff --git a/lib/efm32/efm32lg/Makefile b/lib/efm32/efm32lg/Makefile index 9b6343c0..7765d086 100644 --- a/lib/efm32/efm32lg/Makefile +++ b/lib/efm32/efm32lg/Makefile @@ -25,7 +25,11 @@ PREFIX ?= arm-none-eabi #PREFIX ?= arm-elf CC = $(PREFIX)-gcc AR = $(PREFIX)-ar -CFLAGS = -Os -g -Wall -Wextra -I../../../include -fno-common \ +CFLAGS = -Os -g \ + -Wall -Wextra -Wimplicit-function-declaration \ + -Wredundant-decls -Wmissing-prototypes -Wstrict-prototypes \ + -Wundef -Wshadow \ + -I../../../include -fno-common \ -mcpu=cortex-m3 -mthumb -Wstrict-prototypes \ -ffunction-sections -fdata-sections -MD -D$(FAMILY) # ARFLAGS = rcsv diff --git a/lib/efm32/efm32tg/Makefile b/lib/efm32/efm32tg/Makefile index 605438a0..25c94643 100644 --- a/lib/efm32/efm32tg/Makefile +++ b/lib/efm32/efm32tg/Makefile @@ -25,7 +25,11 @@ PREFIX ?= arm-none-eabi #PREFIX ?= arm-elf CC = $(PREFIX)-gcc AR = $(PREFIX)-ar -CFLAGS = -Os -g -Wall -Wextra -I../../../include -fno-common \ +CFLAGS = -Os -g \ + -Wall -Wextra -Wimplicit-function-declaration \ + -Wredundant-decls -Wmissing-prototypes -Wstrict-prototypes \ + -Wundef -Wshadow \ + -I../../../include -fno-common \ -mcpu=cortex-m3 -mthumb -Wstrict-prototypes \ -ffunction-sections -fdata-sections -MD -D$(FAMILY) # ARFLAGS = rcsv diff --git a/lib/lm3s/Makefile b/lib/lm3s/Makefile index 6fc814d4..fd5aa0cc 100644 --- a/lib/lm3s/Makefile +++ b/lib/lm3s/Makefile @@ -23,7 +23,11 @@ PREFIX ?= arm-none-eabi #PREFIX ?= arm-elf CC = $(PREFIX)-gcc AR = $(PREFIX)-ar -CFLAGS = -Os -g -Wall -Wextra -I../../include -fno-common \ +CFLAGS = -Os -g \ + -Wall -Wextra -Wimplicit-function-declaration \ + -Wredundant-decls -Wmissing-prototypes -Wstrict-prototypes \ + -Wundef -Wshadow \ + -I../../include -fno-common \ -mcpu=cortex-m3 -mthumb -Wstrict-prototypes \ -ffunction-sections -fdata-sections -MD -DLM3S # ARFLAGS = rcsv diff --git a/lib/lm4f/Makefile b/lib/lm4f/Makefile index a3b7dce3..d00025b4 100644 --- a/lib/lm4f/Makefile +++ b/lib/lm4f/Makefile @@ -23,7 +23,11 @@ PREFIX ?= arm-none-eabi #PREFIX ?= arm-elf CC = $(PREFIX)-gcc AR = $(PREFIX)-ar -CFLAGS = -Os -g -Wall -Wextra -I../../include -fno-common \ +CFLAGS = -Os -g \ + -Wall -Wextra -Wimplicit-function-declaration \ + -Wredundant-decls -Wmissing-prototypes -Wstrict-prototypes \ + -Wundef -Wshadow \ + -I../../include -fno-common \ -mcpu=cortex-m4 -mthumb -mfloat-abi=hard -Wstrict-prototypes \ -ffunction-sections -fdata-sections -MD -DLM4F # ARFLAGS = rcsv diff --git a/lib/lpc13xx/Makefile b/lib/lpc13xx/Makefile index 15bc6868..9f78020c 100644 --- a/lib/lpc13xx/Makefile +++ b/lib/lpc13xx/Makefile @@ -23,7 +23,11 @@ PREFIX ?= arm-none-eabi #PREFIX ?= arm-elf CC = $(PREFIX)-gcc AR = $(PREFIX)-ar -CFLAGS = -Os -g -Wall -Wextra -I../../include -fno-common \ +CFLAGS = -Os -g \ + -Wall -Wextra -Wimplicit-function-declaration \ + -Wredundant-decls -Wmissing-prototypes -Wstrict-prototypes \ + -Wundef -Wshadow \ + -I../../include -fno-common \ -mcpu=cortex-m3 -mthumb -Wstrict-prototypes \ -ffunction-sections -fdata-sections -MD -DLPC13XX # ARFLAGS = rcsv diff --git a/lib/lpc17xx/Makefile b/lib/lpc17xx/Makefile index 19fc1529..cbd42522 100644 --- a/lib/lpc17xx/Makefile +++ b/lib/lpc17xx/Makefile @@ -23,7 +23,11 @@ PREFIX ?= arm-none-eabi #PREFIX ?= arm-elf CC = $(PREFIX)-gcc AR = $(PREFIX)-ar -CFLAGS = -O0 -g -Wall -Wextra -I../../include -fno-common \ +CFLAGS = -O0 -g \ + -Wall -Wextra -Wimplicit-function-declaration \ + -Wredundant-decls -Wmissing-prototypes -Wstrict-prototypes \ + -Wundef -Wshadow \ + -I../../include -fno-common \ -mcpu=cortex-m3 -mthumb -Wstrict-prototypes \ -ffunction-sections -fdata-sections -MD -DLPC17XX # ARFLAGS = rcsv diff --git a/lib/lpc43xx/Makefile b/lib/lpc43xx/Makefile index efbba0dd..b35156c7 100644 --- a/lib/lpc43xx/Makefile +++ b/lib/lpc43xx/Makefile @@ -25,7 +25,11 @@ PREFIX ?= arm-none-eabi #PREFIX ?= arm-elf CC = $(PREFIX)-gcc AR = $(PREFIX)-ar -CFLAGS = -O2 -g3 -Wall -Wextra -I../../include -fno-common \ +CFLAGS = -O2 -g3 \ + -Wall -Wextra -Wimplicit-function-declaration \ + -Wredundant-decls -Wmissing-prototypes -Wstrict-prototypes \ + -Wundef -Wshadow \ + -I../../include -fno-common \ -mcpu=cortex-m4 -mthumb -Wstrict-prototypes \ -ffunction-sections -fdata-sections -MD \ -mfloat-abi=hard -mfpu=fpv4-sp-d16 -DLPC43XX diff --git a/lib/stm32/f1/Makefile b/lib/stm32/f1/Makefile index ba0d4b8f..bd637556 100644 --- a/lib/stm32/f1/Makefile +++ b/lib/stm32/f1/Makefile @@ -23,7 +23,11 @@ PREFIX ?= arm-none-eabi #PREFIX ?= arm-elf CC = $(PREFIX)-gcc AR = $(PREFIX)-ar -CFLAGS = -Os -g -Wall -Wextra -I../../../include -fno-common \ +CFLAGS = -Os -g \ + -Wall -Wextra -Wimplicit-function-declaration \ + -Wredundant-decls -Wmissing-prototypes -Wstrict-prototypes \ + -Wundef -Wshadow \ + -I../../../include -fno-common \ -mcpu=cortex-m3 -msoft-float -mthumb -Wstrict-prototypes \ -ffunction-sections -fdata-sections -MD -DSTM32F1 # ARFLAGS = rcsv diff --git a/lib/stm32/f2/Makefile b/lib/stm32/f2/Makefile index 85e64581..8d1c623e 100644 --- a/lib/stm32/f2/Makefile +++ b/lib/stm32/f2/Makefile @@ -23,7 +23,11 @@ PREFIX ?= arm-none-eabi # PREFIX ?= arm-elf CC = $(PREFIX)-gcc AR = $(PREFIX)-ar -CFLAGS = -Os -g -Wall -Wextra -I../../../include -fno-common \ +CFLAGS = -Os -g \ + -Wall -Wextra -Wimplicit-function-declaration \ + -Wredundant-decls -Wmissing-prototypes -Wstrict-prototypes \ + -Wundef -Wshadow \ + -I../../../include -fno-common \ -mcpu=cortex-m3 -mthumb -Wstrict-prototypes \ -ffunction-sections -fdata-sections -MD -DSTM32F2 # ARFLAGS = rcsv diff --git a/lib/stm32/f4/Makefile b/lib/stm32/f4/Makefile index 96e4420e..233619cc 100644 --- a/lib/stm32/f4/Makefile +++ b/lib/stm32/f4/Makefile @@ -23,7 +23,11 @@ PREFIX ?= arm-none-eabi # PREFIX ?= arm-elf CC = $(PREFIX)-gcc AR = $(PREFIX)-ar -CFLAGS = -Os -g -Wall -Wextra -I../../../include -fno-common \ +CFLAGS = -Os -g \ + -Wall -Wextra -Wimplicit-function-declaration \ + -Wredundant-decls -Wmissing-prototypes -Wstrict-prototypes \ + -Wundef -Wshadow \ + -I../../../include -fno-common \ -mcpu=cortex-m4 -mthumb -mfloat-abi=hard -mfpu=fpv4-sp-d16 \ -Wstrict-prototypes \ -ffunction-sections -fdata-sections -MD -DSTM32F4 diff --git a/lib/stm32/l1/Makefile b/lib/stm32/l1/Makefile index 9b677aba..e081daf7 100644 --- a/lib/stm32/l1/Makefile +++ b/lib/stm32/l1/Makefile @@ -23,7 +23,11 @@ PREFIX ?= arm-none-eabi #PREFIX ?= arm-elf CC = $(PREFIX)-gcc AR = $(PREFIX)-ar -CFLAGS = -Os -g -Wall -Wextra -I../../../include -fno-common \ +CFLAGS = -Os -g \ + -Wall -Wextra -Wimplicit-function-declaration \ + -Wredundant-decls -Wmissing-prototypes -Wstrict-prototypes \ + -Wundef -Wshadow \ + -I../../../include -fno-common \ -mcpu=cortex-m3 -mthumb -Wstrict-prototypes \ -ffunction-sections -fdata-sections -MD -DSTM32L1 # ARFLAGS = rcsv