* [PATCH] shut up gcc4's signed pointer warnings
@ 2005-05-05 1:30 Kay Sievers
0 siblings, 0 replies; only message in thread
From: Kay Sievers @ 2005-05-05 1:30 UTC (permalink / raw)
To: git
Suppress these stupid warnings if gcc supports it:
ls-tree.c: In function ‘list_recursive’:
ls-tree.c:34: warning: pointer targets in passing argument 1 of ‘strlen’ differ in signedness
ls-tree.c:34: warning: pointer targets in passing argument 1 of ‘__builtin_strcmp’ differ in signedness
ls-tree.c:34: warning: pointer targets in passing argument 1 of ‘strlen’ differ in signedness
ls-tree.c:34: warning: pointer targets in passing argument 1 of ‘__builtin_strcmp’ differ in signedness
ls-tree.c:34: warning: pointer targets in passing argument 1 of ‘__builtin_strcmp’ differ in signedness
ls-tree.c:34: warning: pointer targets in passing argument 1 of ‘__builtin_strcmp’ differ in signedness
ls-tree.c:66: warning: pointer targets in passing argument 2 of ‘list_recursive’ differ in signedness
Signed-off-by: Kay Sievers <kay.sievers@vrfy.org>
---
--- a/Makefile
+++ b/Makefile
@@ -7,7 +7,11 @@
# BREAK YOUR LOCAL DIFFS! show-diff and anything using it will likely randomly
# break unless your underlying filesystem supports those sub-second times
# (my ext3 doesn't).
+
+cc-supports = ${shell if $(CC) ${1} -S -o /dev/null -xc /dev/null > /dev/null 2>&1; then echo "$(1)"; fi;}
+
CFLAGS=-g -O2 -Wall
+CFLAGS+= $(call cc-supports,-Wno-pointer-sign)
CC=gcc
AR=ar
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2005-05-05 1:24 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-05-05 1:30 [PATCH] shut up gcc4's signed pointer warnings Kay Sievers
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).