sse2: Use uintptr_t in type casts from pointer to integral value
authorStefan Weil <sw@weilnetz.de>
Sat, 9 Feb 2013 11:40:16 +0000 (12:40 +0100)
committerSøren Sandmann Pedersen <ssp@redhat.com>
Wed, 13 Feb 2013 07:18:01 +0000 (02:18 -0500)
Some recent code added new type casts from pointer to unsigned long.
These type casts result in compiler warnings for systems like
MinGW-w64 (64 bit Windows) where sizeof(unsigned long) != sizeof(void *).

Signed-off-by: Stefan Weil <sw@weilnetz.de>
Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
pixman/pixman-sse2.c

index fc873cc..c7e9a4b 100644 (file)
@@ -4558,7 +4558,7 @@ sse2_composite_add_n_8888 (pixman_implementation_t *imp,
        dst = dst_line;
        dst_line += dst_stride;
 
-       while (w && (unsigned long)dst & 15)
+       while (w && (uintptr_t)dst & 15)
        {
            d = *dst;
            *dst++ =
@@ -4617,7 +4617,7 @@ sse2_composite_add_n_8_8888 (pixman_implementation_t *imp,
        mask_line += mask_stride;
        w = width;
 
-       while (w && ((unsigned long)dst & 15))
+       while (w && ((uintptr_t)dst & 15))
        {
            uint8_t m = *mask++;
            if (m)