diff options
author | Stefan Kempf <stefan@cvs.openbsd.org> | 2008-01-07 21:04:48 +0000 |
---|---|---|
committer | Stefan Kempf <stefan@cvs.openbsd.org> | 2008-01-07 21:04:48 +0000 |
commit | 1e5aba22f6ace5148b69ebc3340d769ce52d0b96 (patch) | |
tree | f87177f1698aa4466825b7a6c1e3bba220c322b1 /usr.bin | |
parent | e6ea224009fb449e777ebfa64132b10589093981 (diff) |
Pull from master repo:
Use proper type for ix, code and match in lookup(). ok ragge@
Diffstat (limited to 'usr.bin')
-rw-r--r-- | usr.bin/pcc/ccom/pass1.h | 3 | ||||
-rw-r--r-- | usr.bin/pcc/ccom/symtabs.c | 8 |
2 files changed, 6 insertions, 5 deletions
diff --git a/usr.bin/pcc/ccom/pass1.h b/usr.bin/pcc/ccom/pass1.h index c23e2b8d1f9..e782f2ddeaf 100644 --- a/usr.bin/pcc/ccom/pass1.h +++ b/usr.bin/pcc/ccom/pass1.h @@ -1,4 +1,4 @@ -/* $OpenBSD: pass1.h,v 1.6 2007/12/22 22:56:31 stefan Exp $ */ +/* $OpenBSD: pass1.h,v 1.7 2008/01/07 21:04:47 stefan Exp $ */ /* * Copyright(C) Caldera International Inc. 2001-2002. All rights reserved. * @@ -35,6 +35,7 @@ #include <sys/types.h> #include <stdarg.h> +#include <stdint.h> #include "manifest.h" diff --git a/usr.bin/pcc/ccom/symtabs.c b/usr.bin/pcc/ccom/symtabs.c index 7f0c25dba6f..9f1b1a04cd0 100644 --- a/usr.bin/pcc/ccom/symtabs.c +++ b/usr.bin/pcc/ccom/symtabs.c @@ -1,4 +1,4 @@ -/* $OpenBSD: symtabs.c,v 1.3 2007/11/16 09:00:12 otto Exp $ */ +/* $OpenBSD: symtabs.c,v 1.4 2008/01/07 21:04:47 stefan Exp $ */ /* * Copyright (c) 2003 Anders Magnusson (ragge@ludd.luth.se). * All rights reserved. @@ -179,10 +179,10 @@ lookup(char *key, int ttype) { struct symtab *sym; struct tree *w, *new, *last; - int cix, bit, fbit, svbit, ix, bitno, match; + int cix, bit, fbit, svbit, bitno; int type, uselvl; + intptr_t ix, match, code = (intptr_t)key; - long code = (long)key; type = ttype & SMASK; uselvl = (blevel > 0 && type != SSTRING); @@ -228,7 +228,7 @@ lookup(char *key, int ttype) } sym = (struct symtab *)w; - match = (long)sym->sname; + match = (intptr_t)sym->sname; ix = code ^ match; if (ix == 0) |