From: Johannes Schindelin Date: Sat, 15 Aug 2009 00:08:45 GMT Subject: Re: [PATCH] block-sha1/sha1.c: silence compiler complaints by casting void* to uintptr_t Message-ID: In-Reply-To: <_-0l9qI_nKm-VVtKlL5hzen4bhcyRmiZ1z4jSmKK1LwECXueziRDzSTyacEehOkoqsfYIaEUlds@cipher.nrlssc.navy.mil> Hi, On Fri, 14 Aug 2009, Brandon Casey wrote: > Some compilers produce errors when arithmetic is attempted on pointers to > void. So cast to uintptr_t when performing arithmetic on void pointers. I am confused. Is sizeof(*(uintptr_t)NULL) not larger than 1, and as a consequence ((uintptr_t)p)+1 not different from ((void *)p)+1? Ciao, Dscho