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

Ian Romanick idr at freedesktop.org
Wed Feb 4 14:10:36 PST 2009

On Wed, Feb 04, 2009 at 09:04:05PM +0100, Joerg Sonnenberger wrote:
> 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.

mod +1

I think autoconf has some magic to generate typedefs for uintptr_t and
friends when they are not available.  Make it look like that. :)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 197 bytes
Desc: not available
URL: <http://lists.x.org/archives/xorg/attachments/20090204/be301670/attachment.pgp>

More information about the xorg mailing list