From: Josh Triplett Subject: [PATCH] Use -Werror in HOSTCFLAGS; make xen/tools use HOSTCFLAGS; fix warnings Date: Wed, 03 Aug 2005 09:03:06 -0700 Message-ID: <1123084986.4018.10.camel@localhost.localdomain> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-LkypTzTy5CKK69e0ht5s" Return-path: List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: xen-devel@lists.xensource.com List-Id: xen-devel@lists.xenproject.org --=-LkypTzTy5CKK69e0ht5s Content-Type: text/plain Content-Transfer-Encoding: 7bit The attached patch adds -Werror to HOSTCFLAGS in Config.mk, makes xen/tools actually use HOSTCFLAGS (it was already using HOSTCC), and fixes some gcc-4.0 signedness warnings in xen/tools/symbols.c. Signed-off-by: Josh Triplett - Josh Triplett --=-LkypTzTy5CKK69e0ht5s Content-Disposition: attachment; filename=xen-tools-Werror-clean.patch Content-Type: text/x-patch; name=xen-tools-Werror-clean.patch; charset=UTF-8 Content-Transfer-Encoding: 7bit diff -r 565cec5b9cc2 Config.mk --- a/Config.mk Tue Aug 2 23:13:50 2005 +++ b/Config.mk Tue Aug 2 18:33:54 2005 @@ -7,7 +7,7 @@ # Tools to run on system hosting the build HOSTCC = gcc -HOSTCFLAGS = -Wall -Wstrict-prototypes -O2 -fomit-frame-pointer +HOSTCFLAGS = -Wall -Werror -Wstrict-prototypes -O2 -fomit-frame-pointer AS = $(CROSS_COMPILE)as LD = $(CROSS_COMPILE)ld diff -r 565cec5b9cc2 xen/tools/Makefile --- a/xen/tools/Makefile Tue Aug 2 23:13:50 2005 +++ b/xen/tools/Makefile Tue Aug 2 18:33:54 2005 @@ -10,4 +10,4 @@ rm -f *.o symbols symbols: symbols.c - $(HOSTCC) -o $@ $< + $(HOSTCC) $(HOSTCFLAGS) -o $@ $< diff -r 565cec5b9cc2 xen/tools/symbols.c --- a/xen/tools/symbols.c Tue Aug 2 23:13:50 2005 +++ b/xen/tools/symbols.c Tue Aug 2 18:33:54 2005 @@ -152,8 +152,8 @@ /* include the type field in the symbol name, so that it gets * compressed together */ s->len = strlen(str) + 1; - s->sym = (char *) malloc(s->len + 1); - strcpy(s->sym + 1, str); + s->sym = (unsigned char *) malloc(s->len + 1); + strcpy((char *)(s->sym + 1), str); s->sym[0] = s->type; return 0; @@ -197,16 +197,18 @@ * move then they may get dropped in pass 2, which breaks the * symbols rules. */ - if (s->addr == _etext && strcmp(s->sym + offset, "_etext")) + if (s->addr == _etext && + strcmp((char *)(s->sym + offset), "_etext")) return 0; } /* Exclude symbols which vary between passes. */ - if (strstr(s->sym + offset, "_compiled.")) + if (strstr((char *)(s->sym + offset), "_compiled.")) return 0; for (i = 0; special_symbols[i]; i++) - if( strcmp(s->sym + offset, special_symbols[i]) == 0 ) + if( strcmp((char *)(s->sym + offset), + special_symbols[i]) == 0 ) return 0; return 1; --=-LkypTzTy5CKK69e0ht5s Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel --=-LkypTzTy5CKK69e0ht5s--