From 5175be99420813b64bbe6687d8225ccf25374375 Mon Sep 17 00:00:00 2001 From: "kaf24@firebug.cl.cam.ac.uk" Date: Mon, 8 Aug 2005 08:32:52 +0000 Subject: 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 --- xen/tools/Makefile | 2 +- xen/tools/symbols.c | 10 +++++----- 2 files changed, 6 insertions(+), 6 deletions(-) (limited to 'xen/tools') diff --git a/xen/tools/Makefile b/xen/tools/Makefile index 04d7020cd8..4d353617bd 100644 --- a/xen/tools/Makefile +++ b/xen/tools/Makefile @@ -10,4 +10,4 @@ clean: rm -f *.o symbols symbols: symbols.c - $(HOSTCC) -o $@ $< + $(HOSTCC) $(HOSTCFLAGS) -o $@ $< diff --git a/xen/tools/symbols.c b/xen/tools/symbols.c index a5665cc124..7bc141e210 100644 --- a/xen/tools/symbols.c +++ b/xen/tools/symbols.c @@ -152,8 +152,8 @@ read_symbol(FILE *in, struct sym_entry *s) /* 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,16 @@ symbol_valid(struct sym_entry *s) * 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; -- cgit v1.2.3