chiark / gitweb /
cleanup: add many compiler warning options
authorIan Jackson <ijackson@chiark.greenend.org.uk>
Wed, 25 May 2011 20:00:36 +0000 (21:00 +0100)
committerIan Jackson <ijackson@chiark.greenend.org.uk>
Sun, 19 Jun 2011 15:34:08 +0000 (16:34 +0100)
This is a set of warning options which are useful and IMO should be
enabled in secnet.  Currently the code is not warning-clean to the
required standard; subsequent changes will fix the warnings.

Signed-off-by: Richard Kettlewell <richard@greenend.org.uk>
Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
Makefile.in

index ed11d9bc0b288df33684196267fb2cabc91e91cd..dd94837cd3b1eaa212c19e48e1e43bc25631c73c 100644 (file)
@@ -34,7 +34,12 @@ INSTALL_PROGRAM:=@INSTALL_PROGRAM@
 # Use -DHACKY_PARALLEL if you are compiling secnet for an extremely
 # slow machine
 #CFLAGS:=-Wall @WRITESTRINGS@ @CFLAGS@ -DHACKY_PARALLEL
 # Use -DHACKY_PARALLEL if you are compiling secnet for an extremely
 # slow machine
 #CFLAGS:=-Wall @WRITESTRINGS@ @CFLAGS@ -DHACKY_PARALLEL
-CFLAGS:=-Wall @WRITESTRINGS@ @CFLAGS@
+CFLAGS:=-Wall @WRITESTRINGS@ @CFLAGS@ \
+       -W -Wno-unused \
+       -Wno-pointer-sign -Wstrict-prototypes -Wmissing-prototypes \
+       -Wmissing-declarations -Wnested-externs -Wredundant-decls \
+       -Wpointer-arith -Wformat=2 -Winit-self \
+       -Wswitch-enum -Wunused-variable -Wbad-function-cast
 ALL_CFLAGS:=@DEFS@ -I$(srcdir) -I. $(CFLAGS)
 CPPFLAGS:=@CPPFLAGS@
 LDFLAGS:=@LDFLAGS@
 ALL_CFLAGS:=@DEFS@ -I$(srcdir) -I. $(CFLAGS)
 CPPFLAGS:=@CPPFLAGS@
 LDFLAGS:=@LDFLAGS@