summaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorDavid Gibson <david@gibson.dropbear.id.au>2010-03-09 10:49:33 +1100
committerJon Loeliger <jdl@jdl.com>2010-03-10 08:12:28 -0600
commit74f6a51b1f71ffc7d9557e063630469a93eeddec (patch)
treec9f4bc016350af9bbd9b2b671d8aa4f687e7f9fc /Makefile
parent8765874963852b2733777e69686251205238ad3d (diff)
downloaddtc-74f6a51b1f71ffc7d9557e063630469a93eeddec.tar.gz
dtc: Enable more warnings
This patch turns on a bunch of extra gcc warnings, most of which are probably a good idea. Of the new warnings -Wnested-externs and -Wstrict-prototypes need no code changes, we're already warning-clean. The remaining one, -Wmissing-prototypes requires trivial changes in some of the tests (making functions local). This patch also rearranges the warnings flags into a separate make variable for convenience, and turns on -Werror, to really encourage people to keep the code warning-clean. Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile4
1 files changed, 3 insertions, 1 deletions
diff --git a/Makefile b/Makefile
index d7549b2..b49aebb 100644
--- a/Makefile
+++ b/Makefile
@@ -16,7 +16,9 @@ LOCAL_VERSION =
CONFIG_LOCALVERSION =
CPPFLAGS = -I libfdt
-CFLAGS = -Wall -g -Os -fPIC -Wpointer-arith -Wcast-qual
+WARNINGS = -Werror -Wall -Wpointer-arith -Wcast-qual -Wnested-externs \
+ -Wstrict-prototypes -Wmissing-prototypes
+CFLAGS = -g -Os -fPIC -Werror $(WARNINGS)
BISON = bison
LEX = flex