--- ray/src/common/modobject.c 2003/03/10 17:13:29 2.9 +++ ray/src/common/modobject.c 2004/07/14 02:37:23 2.12 @@ -1,5 +1,5 @@ #ifndef lint -static const char RCSid[] = "$Id: modobject.c,v 2.9 2003/03/10 17:13:29 greg Exp $"; +static const char RCSid[] = "$Id: modobject.c,v 2.12 2004/07/14 02:37:23 greg Exp $"; #endif /* * Routines for tracking object modifiers @@ -21,7 +21,7 @@ static struct ohtab { OBJECT *htab; /* table, if allocated */ } modtab = {100, NULL}, objtab = {1000, NULL}; /* modifiers and objects */ -static int otndx(); +static int otndx(char *, struct ohtab *); OBJECT @@ -32,7 +32,7 @@ register OBJREC *op; for (i = nobjects>>OBJBLKSHFT; i >= 0; i--) { j = op - objblock[i]; - if (j >= 0 && j < OBJBLKSIZ) + if ((j >= 0) & (j < OBJBLKSIZ)) return((i< 0; ) { /* need to search */ op = objptr(i); @@ -158,7 +158,7 @@ register struct ohtab *tab; hval = shash(name); tryagain: for (i = 0; i < tab->hsiz; i++) { - ndx = (hval + i*i) % tab->hsiz; + ndx = (hval + (unsigned long)i*i) % tab->hsiz; if (tab->htab[ndx] == OVOID || !strcmp(objptr(tab->htab[ndx])->oname, name)) return(ndx);