[PATCH] Fix cast int-to-pointer and pointer-to-int

Joerg Sonnenberger joerg at britannica.bec.de
Wed Feb 4 12:04:05 PST 2009


On Wed, Feb 04, 2009 at 08:43:43PM +0100, Tomas Carnecky wrote:
> By first casting to long and then to the final type. Of course
> this assumes that sizeof(long) == sizeof(void *). If the Win32
> folks care enough about warnings, we could make macros for this.

Please use either uintptr_t (prefered) or size_t (fallback) instead of
long. Also really make this a macro so that it can easily be searched
for.

Joerg



More information about the xorg mailing list