From 309a6aa2bfbde5d805f3644a2537a3444fba69df Mon Sep 17 00:00:00 2001 From: Joakim Axelsson Date: Fri, 3 Dec 2010 11:03:16 +0800 Subject: db8500: Make sure code is warning free Add -Wall -Wextra -Werror to CFLAGS for db8500 SoC code. Also add -Wno-unused-parameter due to some inline functions in generic include files are having unused parameters. ST-Ericsson ID: None Signed-off-by: Joakim Axelsson Change-Id: Ibc59c6e4ad1188e96d7c65d600881869b7024ce8 Reviewed-on: http://gerrit.lud.stericsson.com/gerrit/9891 Reviewed-by: Michael BRANDT --- cpu/arm_cortexa9/db8500/Makefile | 8 +++++++- cpu/arm_cortexa9/db8500/clock.c | 2 +- cpu/arm_cortexa9/db8500/timer.c | 1 + 3 files changed, 9 insertions(+), 2 deletions(-) (limited to 'cpu') diff --git a/cpu/arm_cortexa9/db8500/Makefile b/cpu/arm_cortexa9/db8500/Makefile index 180da3026..39034bb18 100644 --- a/cpu/arm_cortexa9/db8500/Makefile +++ b/cpu/arm_cortexa9/db8500/Makefile @@ -25,9 +25,15 @@ include $(TOPDIR)/config.mk LIB = $(obj)lib$(SOC).a -COBJS = timer.o interrupts.o +# We want warnings free code. +# Some generic include files have inline functions with unused parameters. +CFLAGS += -Wall -Wextra -Werror -Wno-unused-parameter + +# Please keep one file per line and in alphabetical order COBJS += clock.o +COBJS += interrupts.o COBJS += prcmu.o +COBJS += timer.o SRCS := $(START:.o=.S) $(COBJS:.o=.c) OBJS := $(addprefix $(obj),$(COBJS)) diff --git a/cpu/arm_cortexa9/db8500/clock.c b/cpu/arm_cortexa9/db8500/clock.c index 41f1bb254..9e3b87394 100755 --- a/cpu/arm_cortexa9/db8500/clock.c +++ b/cpu/arm_cortexa9/db8500/clock.c @@ -37,7 +37,7 @@ static unsigned int clkrst_base[] = { U8500_CLKRST1_BASE, U8500_CLKRST2_BASE, U8500_CLKRST3_BASE, - NULL, + 0, U8500_CLKRST5_BASE, U8500_CLKRST6_BASE, U8500_CLKRST7_BASE, /* ED only */ diff --git a/cpu/arm_cortexa9/db8500/timer.c b/cpu/arm_cortexa9/db8500/timer.c index bc27755b1..42d70c73e 100644 --- a/cpu/arm_cortexa9/db8500/timer.c +++ b/cpu/arm_cortexa9/db8500/timer.c @@ -22,6 +22,7 @@ #include #include +#include #include #include -- cgit v1.2.3