2011-04-03 Paul Eggert <eggert@cs.ucla.edu>
* fns.c (substring_both): Remove var that is set but not used.
+ (sxhash): Redo loop for clarity and to avoid wraparound warning.
* eval.c (funcall_lambda): Rename local to avoid shadowing.
{
double val = XFLOAT_DATA (obj);
unsigned char *p = (unsigned char *) &val;
- unsigned char *e = p + sizeof val;
- for (hash = 0; p < e; ++p)
- hash = SXHASH_COMBINE (hash, *p);
+ size_t i;
+ for (hash = 0, i = 0; i < sizeof val; i++)
+ hash = SXHASH_COMBINE (hash, p[i]);
break;
}