summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorkay.sievers@vrfy.org <kay.sievers@vrfy.org>2005-02-05 02:44:37 +0100
committerGreg KH <gregkh@suse.de>2005-04-26 23:24:19 -0700
commit51df9ee4965516b17dcd50647546ee970df87b32 (patch)
tree39bbca7fa44454a5fd83337a64324dae4f90ecf6
parent045b1f0f7a7af2182e7109f472d873f1cc0c5e4b (diff)
[PATCH] Makefile: add some more warnings and prepare for clean gcc4 compile
-rw-r--r--Makefile8
-rw-r--r--extras/volume_id/Makefile3
2 files changed, 6 insertions, 5 deletions
diff --git a/Makefile b/Makefile
index 052e41acc3..dc907f6a81 100644
--- a/Makefile
+++ b/Makefile
@@ -108,8 +108,12 @@ GCC_LIB := $(shell $(CC) -print-libgcc-file-name )
OPTIMIZATION := ${shell if $(CC) -Os -S -o /dev/null -xc /dev/null >/dev/null 2>&1; \
then echo "-Os"; else echo "-O2" ; fi}
-# add -Wredundant-decls when libsysfs gets cleaned up
-WARNINGS := -Wall
+# check if compiler option is supported
+cc-supports = ${shell if $(CC) ${1} -S -o /dev/null -xc /dev/null > /dev/null 2>&1; then echo "$(1)"; fi;}
+
+WARNINGS := -Wall -fno-builtin -Wchar-subscripts -Wpointer-arith -Wstrict-prototypes -Wsign-compare
+WARNINGS += $(call cc-supports,-Wno-pointer-sign)
+WARNINGS += $(call cc-supports,-Wdeclaration-after-statement)
CFLAGS := -pipe
diff --git a/extras/volume_id/Makefile b/extras/volume_id/Makefile
index f0c15b8fec..d273ed795c 100644
--- a/extras/volume_id/Makefile
+++ b/extras/volume_id/Makefile
@@ -28,9 +28,6 @@ INSTALL_PROGRAM = ${INSTALL}
INSTALL_DATA = ${INSTALL} -m 644
INSTALL_SCRIPT = ${INSTALL_PROGRAM}
-override CFLAGS+=-Wall -fno-builtin -Wchar-subscripts \
- -Wpointer-arith -Wcast-align -Wsign-compare
-
override CFLAGS+=-D_FILE_OFFSET_BITS=64
VOLUME_ID_OBJS= \