Derek Price writes: > > Why do you cast to char * here, when ret is actually a void *? Is this > necessary? > > void *unaligned_ptr = xmalloc (size + pagesize - 1); > ret = (char *) unaligned_ptr > + ((- (unsigned long) unaligned_ptr) & (pagesize - 1));
Yes: unaligned_ptr is a void * and you're not allowed to do arithmetic on void *s (except as a GCC extension), so you have to cast it to char * first. -Larry Jones Honey, are we out of aspirin again? -- Calvin's Dad _______________________________________________ Bug-cvs mailing list Bug-cvs@gnu.org http://lists.gnu.org/mailman/listinfo/bug-cvs