diff --git a/ChangeLog b/ChangeLog index 61f46bac5f..d97d8de73b 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2008-08-05 Tor Lillqvist + + * gdk/gdkrgb.c: Cast pointers to guintptr, not unsigned long, + before doing bit tests on them. + 2008-08-05 Tor Lillqvist * configure.in: Define GDK_NATIVE_WINDOW_POINTER on 32-bit diff --git a/gdk/gdkrgb.c b/gdk/gdkrgb.c index cb138636ed..9b6a1b11f2 100644 --- a/gdk/gdkrgb.c +++ b/gdk/gdkrgb.c @@ -862,7 +862,7 @@ gdk_rgb_convert_8 (GdkRgbInfo *image_info, GdkImage *image, { bp2 = bptr; obptr = obuf; - if (((unsigned long)obuf | (unsigned long) bp2) & 3) + if (((guintptr)obuf | (guintptr) bp2) & 3) { for (x = 0; x < width; x++) { @@ -1495,7 +1495,7 @@ gdk_rgb_convert_565 (GdkRgbInfo *image_info, GdkImage *image, { bp2 = bptr; obptr = obuf; - if (((unsigned long)obuf | (unsigned long) bp2) & 3) + if (((guintptr)obuf | (guintptr) bp2) & 3) { for (x = 0; x < width; x++) { @@ -1626,7 +1626,7 @@ gdk_rgb_convert_565_gray (GdkRgbInfo *image_info, GdkImage *image, { bp2 = bptr; obptr = obuf; - if (((unsigned long)obuf | (unsigned long) bp2) & 3) + if (((guintptr)obuf | (guintptr) bp2) & 3) { for (x = 0; x < width; x++) { @@ -1768,7 +1768,7 @@ gdk_rgb_convert_565_d (GdkRgbInfo *image_info, GdkImage *image, const guint32 *dmp = DM_565 + ((y & (DM_HEIGHT - 1)) << DM_WIDTH_SHIFT); bp2 = bptr; obptr = obuf; - if (((unsigned long)obuf | (unsigned long) bp2) & 3) + if (((guintptr)obuf | (guintptr) bp2) & 3) { for (x = x_align; x < width; x++) { @@ -2030,7 +2030,7 @@ gdk_rgb_convert_888_lsb (GdkRgbInfo *image_info, GdkImage *image, { bp2 = bptr; obptr = obuf; - if (((unsigned long)obuf | (unsigned long) bp2) & 3) + if (((guintptr)obuf | (guintptr) bp2) & 3) { for (x = 0; x < width; x++) {