With gcc4, turn off unnecessart pointer sign warnings.

This commit is contained in:
Nicholas Marriott 2009-07-20 05:40:13 +00:00
parent 376c808b50
commit 680f2098f1
2 changed files with 23 additions and 17 deletions

View File

@ -1,4 +1,4 @@
# $Id: GNUmakefile,v 1.109 2009-07-14 06:47:12 nicm Exp $ # $Id: GNUmakefile,v 1.110 2009-07-20 05:40:12 nicm Exp $
.PHONY: clean .PHONY: clean
@ -11,14 +11,6 @@ CFLAGS+= -DBUILD="\"$(VERSION)\""
LDFLAGS+= -L/usr/local/lib LDFLAGS+= -L/usr/local/lib
LIBS+= -lcurses LIBS+= -lcurses
# This sort of sucks but gets rid of the stupid warning and should work on
# most platforms...
ifeq ($(shell (LC_ALL=C $(CC) -v 2>&1|awk '/gcc version 4/') || true), )
CPPFLAGS:= -I. -I- $(CPPFLAGS)
else
CPPFLAGS:= -iquote. $(CPPFLAGS)
endif
ifdef FDEBUG ifdef FDEBUG
CFLAGS+= -g -ggdb -DDEBUG CFLAGS+= -g -ggdb -DDEBUG
CFLAGS+= -Wno-long-long -Wall -W -Wnested-externs -Wformat=2 CFLAGS+= -Wno-long-long -Wall -W -Wnested-externs -Wformat=2
@ -27,6 +19,17 @@ CFLAGS+= -Wwrite-strings -Wshadow -Wpointer-arith -Wsign-compare
CFLAGS+= -Wundef -Wbad-function-cast -Winline -Wcast-align CFLAGS+= -Wundef -Wbad-function-cast -Winline -Wcast-align
endif endif
# This sort of sucks but gets rid of the stupid warning and should work on
# most platforms...
ifeq ($(shell (LC_ALL=C $(CC) -v 2>&1|awk '/gcc version 4/') || true), )
CPPFLAGS:= -I. -I- $(CPPFLAGS)
else
CPPFLAGS:= -iquote. $(CPPFLAGS)
ifdef FDEBUG
CFLAGS+= -Wno-pointer-sign
endif
endif
PREFIX?= /usr/local PREFIX?= /usr/local
INSTALLDIR= install -d INSTALLDIR= install -d
INSTALLBIN= install -g bin -o root -m 555 INSTALLBIN= install -g bin -o root -m 555

View File

@ -1,4 +1,4 @@
# $Id: Makefile,v 1.144 2009-07-14 06:47:12 nicm Exp $ # $Id: Makefile,v 1.145 2009-07-20 05:40:13 nicm Exp $
.SUFFIXES: .c .o .SUFFIXES: .c .o
.PHONY: clean .PHONY: clean
@ -12,6 +12,14 @@ CFLAGS+= -DBUILD="\"$(VERSION)\""
LDFLAGS+= -L/usr/local/lib LDFLAGS+= -L/usr/local/lib
LIBS+= -lcurses LIBS+= -lcurses
.ifdef FDEBUG
CFLAGS+= -g -ggdb -DDEBUG
CFLAGS+= -Wno-long-long -Wall -W -Wnested-externs -Wformat=2
CFLAGS+= -Wmissing-prototypes -Wstrict-prototypes -Wmissing-declarations
CFLAGS+= -Wwrite-strings -Wshadow -Wpointer-arith -Wsign-compare
CFLAGS+= -Wundef -Wbad-function-cast -Winline -Wcast-align
.endif
# This sort of sucks but gets rid of the stupid warning and should work on # This sort of sucks but gets rid of the stupid warning and should work on
# most platforms... # most platforms...
CCV!= (LC_ALL=C ${CC} -v 2>&1|awk '/gcc version 4/') || true CCV!= (LC_ALL=C ${CC} -v 2>&1|awk '/gcc version 4/') || true
@ -19,14 +27,9 @@ CCV!= (LC_ALL=C ${CC} -v 2>&1|awk '/gcc version 4/') || true
CPPFLAGS:= -I. -I- -I/usr/local/include ${CPPFLAGS} CPPFLAGS:= -I. -I- -I/usr/local/include ${CPPFLAGS}
.else .else
CPPFLAGS:= -iquote. -I/usr/local/include ${CPPFLAGS} CPPFLAGS:= -iquote. -I/usr/local/include ${CPPFLAGS}
.endif
.ifdef FDEBUG .ifdef FDEBUG
CFLAGS+= -g -ggdb -DDEBUG CFLAGS+= -Wno-pointer-sign
CFLAGS+= -Wno-long-long -Wall -W -Wnested-externs -Wformat=2 .endif
CFLAGS+= -Wmissing-prototypes -Wstrict-prototypes -Wmissing-declarations
CFLAGS+= -Wwrite-strings -Wshadow -Wpointer-arith -Wsign-compare
CFLAGS+= -Wundef -Wbad-function-cast -Winline -Wcast-align
.endif .endif
PREFIX?= /usr/local PREFIX?= /usr/local