[Pixman] [PATCH] sse2: Use uintptr_t in type casts from pointer to integral value

Stefan Weil sw at weilnetz.de
Sat Feb 9 03:40:16 PST 2013


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 at weilnetz.de>
---
 pixman/pixman-sse2.c |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/pixman/pixman-sse2.c b/pixman/pixman-sse2.c
index fc873cc..c7e9a4b 100644
--- a/pixman/pixman-sse2.c
+++ b/pixman/pixman-sse2.c
@@ -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)
-- 
1.7.10.4



More information about the Pixman mailing list