On Thu, Jan 10, 2002 at 02:10:13AM -0000, [EMAIL PROTECTED] wrote: > trawick 02/01/09 18:10:13 > > Modified: shmem/unix shm.c > Log: > get some pointer arithmetic to compile on picky compilers > > Revision Changes Path > 1.2 +1 -1 apr/shmem/unix/shm.c > > Index: shm.c > =================================================================== > RCS file: /home/cvs/apr/shmem/unix/shm.c,v > retrieving revision 1.1 > retrieving revision 1.2 > diff -u -r1.1 -r1.2 > --- shm.c 10 Jan 2002 00:20:06 -0000 1.1 > +++ shm.c 10 Jan 2002 02:10:13 -0000 1.2 > @@ -153,7 +153,7 @@ > /* store the real size in the metadata */ > *(apr_size_t*)(new_m->base) = new_m->realsize; > /* metadata isn't usable */ > - new_m->usable = new_m->base + sizeof(apr_size_t); > + new_m->usable = (char *)new_m->base + sizeof(apr_size_t);
What a weird compiler -- it complains about type agreement for addition expressions, but not for LHS/RHS agreement on assignment expressions? (I suppose it minds adding anything to a void*, but doesn't mind assigning a char* to a void*.) -aaron
