direct-io.hg
changeset 6041:41ceeb6828b5
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 <josht@us.ibm.com>
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 <josht@us.ibm.com>
author | kaf24@firebug.cl.cam.ac.uk |
---|---|
date | Mon Aug 08 08:32:52 2005 +0000 (2005-08-08) |
parents | c4512592a1dc |
children | b60643391488 |
files | Config.mk xen/tools/Makefile xen/tools/symbols.c |
line diff
1.1 --- a/Config.mk Mon Aug 08 08:18:38 2005 +0000 1.2 +++ b/Config.mk Mon Aug 08 08:32:52 2005 +0000 1.3 @@ -7,7 +7,7 @@ XEN_TARGET_X86_PAE ?= n 1.4 1.5 # Tools to run on system hosting the build 1.6 HOSTCC = gcc 1.7 -HOSTCFLAGS = -Wall -Wstrict-prototypes -O2 -fomit-frame-pointer 1.8 +HOSTCFLAGS = -Wall -Werror -Wstrict-prototypes -O2 -fomit-frame-pointer 1.9 1.10 AS = $(CROSS_COMPILE)as 1.11 LD = $(CROSS_COMPILE)ld
2.1 --- a/xen/tools/Makefile Mon Aug 08 08:18:38 2005 +0000 2.2 +++ b/xen/tools/Makefile Mon Aug 08 08:32:52 2005 +0000 2.3 @@ -10,4 +10,4 @@ clean: 2.4 rm -f *.o symbols 2.5 2.6 symbols: symbols.c 2.7 - $(HOSTCC) -o $@ $< 2.8 + $(HOSTCC) $(HOSTCFLAGS) -o $@ $<
3.1 --- a/xen/tools/symbols.c Mon Aug 08 08:18:38 2005 +0000 3.2 +++ b/xen/tools/symbols.c Mon Aug 08 08:32:52 2005 +0000 3.3 @@ -152,8 +152,8 @@ read_symbol(FILE *in, struct sym_entry * 3.4 /* include the type field in the symbol name, so that it gets 3.5 * compressed together */ 3.6 s->len = strlen(str) + 1; 3.7 - s->sym = (char *) malloc(s->len + 1); 3.8 - strcpy(s->sym + 1, str); 3.9 + s->sym = (unsigned char *) malloc(s->len + 1); 3.10 + strcpy((char *)s->sym + 1, str); 3.11 s->sym[0] = s->type; 3.12 3.13 return 0; 3.14 @@ -197,16 +197,16 @@ symbol_valid(struct sym_entry *s) 3.15 * move then they may get dropped in pass 2, which breaks the 3.16 * symbols rules. 3.17 */ 3.18 - if (s->addr == _etext && strcmp(s->sym + offset, "_etext")) 3.19 + if (s->addr == _etext && strcmp((char *)s->sym + offset, "_etext")) 3.20 return 0; 3.21 } 3.22 3.23 /* Exclude symbols which vary between passes. */ 3.24 - if (strstr(s->sym + offset, "_compiled.")) 3.25 + if (strstr((char *)s->sym + offset, "_compiled.")) 3.26 return 0; 3.27 3.28 for (i = 0; special_symbols[i]; i++) 3.29 - if( strcmp(s->sym + offset, special_symbols[i]) == 0 ) 3.30 + if( strcmp((char *)s->sym + offset, special_symbols[i]) == 0 ) 3.31 return 0; 3.32 3.33 return 1;