Hello All,

A little set of patches to apply to evas (All are relative to
${E17ROOT}/libs/evas).  They are (in no particular order):

* freegc-crash.patch
- Don't free a X11 GC unless we have one (software x11)

* iindex-to-many-is.patch
- Code checks *iindex is > 0, I assume it is meant to check that index
   is less then <= 0.  Actually I wonder if it should read:
if (index < 0)

* c89-is-18-years-old-lets-use-it.patch
- func() is the old style k&r declaration which means: Pass as many
arguments as you damn well please, the compiler ain't checking... 

* kill-a-1-in-4-billion-crash.patch
- Returning the lowest 32 bits of a pointer on a 64 bit arch to check
for !NULL is not the best solution.  Could also restructure instead.
And it's probably not a crash, but it is a bug.

* dereference-ints-all-bad.patch
- Code puts a pointer in an int, does some maths on it, then
dereference... all fine unless sizeof(void*)>sizeof(int).  Use intptr_t
instead, which is always >= sizeof(void*).

* compare-whole-pointer.patch
- This is mostly cleanliness (ie the code works, but it's not pretty).
Once again use intptr_t instead of int for pointers.

* mode-mem.patch
- As above - but in a different file.

Also I've included:
* evas.patch
- All of the above in one ugly .patch file.  Just in case someone crazy
with commit thinks all the above are fine... and couldn't be bothered
applying them all separately.

All against anoncvs check out of about 3 hours ago... 

        Regards,
        nash


Index: src/lib/engines/common/evas_draw_main.c
===================================================================
RCS file: /var/cvs/e/e17/libs/evas/src/lib/engines/common/evas_draw_main.c,v
retrieving revision 1.22
diff -u -r1.22 evas_draw_main.c
--- src/lib/engines/common/evas_draw_main.c	30 Apr 2007 04:23:47 -0000	1.22
+++ src/lib/engines/common/evas_draw_main.c	12 Sep 2007 02:47:18 -0000
@@ -1,7 +1,7 @@
 #include "evas_common.h"
 
 EAPI Cutout_Rects*
-evas_common_draw_context_cutouts_new()
+evas_common_draw_context_cutouts_new(void)
 {
    Cutout_Rects *rects;


Index: src/lib/engines/common/evas_convert_main.c
===================================================================
RCS file: /var/cvs/e/e17/libs/evas/src/lib/engines/common/evas_convert_main.c,v
retrieving revision 1.8
diff -u -r1.8 evas_convert_main.c
--- src/lib/engines/common/evas_convert_main.c	2 Mar 2007 14:51:16 -0000	1.8
+++ src/lib/engines/common/evas_convert_main.c	12 Sep 2007 02:47:17 -0000
@@ -202,7 +202,7 @@
 #ifdef BUILD_CONVERT_16_RGB_ROT0
 		  if (rotation == 0)
 		    {
-		       if ((!(w & 0x1)) && (!((int)dest & 0x3)))
+		       if ((!(w & 0x1)) && (!((intptr_t)dest & 0x3)))
 			 return evas_common_convert_rgba2_to_16bpp_rgb_565_dith;
 		       else
 			 return evas_common_convert_rgba_to_16bpp_rgb_565_dith;
@@ -211,7 +211,7 @@
 #ifdef BUILD_CONVERT_16_RGB_ROT180
 		  if (rotation == 180)
 		    {
-		       if ((!(w & 0x1)) && (!((int)dest & 0x3)))
+		       if ((!(w & 0x1)) && (!((intptr_t)dest & 0x3)))
 			 return evas_common_convert_rgba2_to_16bpp_rgb_565_dith_rot_180;
 		       else
 			 return evas_common_convert_rgba_to_16bpp_rgb_565_dith_rot_180;
@@ -220,7 +220,7 @@
 #ifdef BUILD_CONVERT_16_RGB_ROT270
 		  if (rotation == 270)
 		    {
-		       if ((!(w & 0x1)) && (!((int)dest & 0x3)))
+		       if ((!(w & 0x1)) && (!((intptr_t)dest & 0x3)))
 			 return evas_common_convert_rgba2_to_16bpp_rgb_565_dith_rot_270;
 		       else
 			 return evas_common_convert_rgba_to_16bpp_rgb_565_dith_rot_270;
@@ -229,7 +229,7 @@
 #ifdef BUILD_CONVERT_16_RGB_ROT90
 		  if (rotation == 90)
 		    {
-		       if ((!(w & 0x1)) && (!((int)dest & 0x3)))
+		       if ((!(w & 0x1)) && (!((intptr_t)dest & 0x3)))
 			 return evas_common_convert_rgba2_to_16bpp_rgb_565_dith_rot_90;
 		       else
 			 return evas_common_convert_rgba_to_16bpp_rgb_565_dith_rot_90;
@@ -243,7 +243,7 @@
 #ifdef BUILD_CONVERT_16_RGB_ROT0
 		  if (rotation == 0)
 		    {
-		       if ((!(w & 0x1)) && (!((int)dest & 0x3)))
+		       if ((!(w & 0x1)) && (!((intptr_t)dest & 0x3)))
 			 return evas_common_convert_rgba2_to_16bpp_bgr_565_dith;
 		       else
 			 return evas_common_convert_rgba_to_16bpp_bgr_565_dith;
@@ -252,7 +252,7 @@
 #ifdef BUILD_CONVERT_16_RGB_ROT180
 		  if (rotation == 180)
 		    {
-		       if ((!(w & 0x1)) && (!((int)dest & 0x3)))
+		       if ((!(w & 0x1)) && (!((intptr_t)dest & 0x3)))
 			 return evas_common_convert_rgba2_to_16bpp_bgr_565_dith_rot_180;
 		       else
 			 return evas_common_convert_rgba_to_16bpp_bgr_565_dith_rot_180;
@@ -261,7 +261,7 @@
 #ifdef BUILD_CONVERT_16_RGB_ROT270
 		  if (rotation == 270)
 		    {
-		       if ((!(w & 0x1)) && (!((int)dest & 0x3)))
+		       if ((!(w & 0x1)) && (!((intptr_t)dest & 0x3)))
 			 return evas_common_convert_rgba2_to_16bpp_bgr_565_dith_rot_270;
 		       else
 			 return evas_common_convert_rgba_to_16bpp_bgr_565_dith_rot_270;
@@ -270,7 +270,7 @@
 #ifdef BUILD_CONVERT_16_RGB_ROT90
 		  if (rotation == 90)
 		    {
-		       if ((!(w & 0x1)) && (!((int)dest & 0x3)))
+		       if ((!(w & 0x1)) && (!((intptr_t)dest & 0x3)))
 			 return evas_common_convert_rgba2_to_16bpp_bgr_565_dith_rot_90;
 		       else
 			 return evas_common_convert_rgba_to_16bpp_bgr_565_dith_rot_90;
@@ -284,7 +284,7 @@
 #ifdef BUILD_CONVERT_16_RGB_ROT0
 		  if (rotation == 0)
 		    {
-		       if ((!(w & 0x1)) && (!((int)dest & 0x3)))
+		       if ((!(w & 0x1)) && (!((intptr_t)dest & 0x3)))
 			 return evas_common_convert_rgba2_to_16bpp_rgb_555_dith;
 		       else
  			 return evas_common_convert_rgba_to_16bpp_rgb_555_dith;
@@ -293,7 +293,7 @@
 #ifdef BUILD_CONVERT_16_RGB_ROT180
 		  if (rotation == 180)
 		    {
-		       if ((!(w & 0x1)) && (!((int)dest & 0x3)))
+		       if ((!(w & 0x1)) && (!((intptr_t)dest & 0x3)))
 			 return evas_common_convert_rgba2_to_16bpp_rgb_555_dith_rot_180;
 		       else
 			 return evas_common_convert_rgba_to_16bpp_rgb_555_dith_rot_180;
@@ -302,7 +302,7 @@
 #ifdef BUILD_CONVERT_16_RGB_ROT270
 		  if (rotation == 270)
 		    {
-		       if ((!(w & 0x1)) && (!((int)dest & 0x3)))
+		       if ((!(w & 0x1)) && (!((intptr_t)dest & 0x3)))
 			 return evas_common_convert_rgba2_to_16bpp_rgb_555_dith_rot_270;
 		       else
 			 return evas_common_convert_rgba_to_16bpp_rgb_555_dith_rot_270;
@@ -311,7 +311,7 @@
 #ifdef BUILD_CONVERT_16_RGB_ROT90
 		  if (rotation == 90)
 		    {
-		       if ((!(w & 0x1)) && (!((int)dest & 0x3)))
+		       if ((!(w & 0x1)) && (!((intptr_t)dest & 0x3)))
 			 return evas_common_convert_rgba2_to_16bpp_rgb_555_dith_rot_90;
 		       else
 			 return evas_common_convert_rgba_to_16bpp_rgb_555_dith_rot_90;
@@ -325,7 +325,7 @@
 #ifdef BUILD_CONVERT_16_RGB_ROT0
 		  if (rotation == 0)
 		    {
-		       if ((!(w & 0x1)) && (!((int)dest & 0x3)))
+		       if ((!(w & 0x1)) && (!((intptr_t)dest & 0x3)))
 			 return evas_common_convert_rgba2_to_16bpp_rgb_444_dith;
 		       else
 			 return evas_common_convert_rgba_to_16bpp_rgb_444_dith;
@@ -334,7 +334,7 @@
 #ifdef BUILD_CONVERT_16_RGB_ROT180
 		  if (rotation == 180)
 		    {
-		       if ((!(w & 0x1)) && (!((int)dest & 0x3)))
+		       if ((!(w & 0x1)) && (!((intptr_t)dest & 0x3)))
 			 return evas_common_convert_rgba2_to_16bpp_rgb_444_dith_rot_180;
 		       else
 			 return evas_common_convert_rgba_to_16bpp_rgb_444_dith_rot_180;
@@ -343,7 +343,7 @@
 #ifdef BUILD_CONVERT_16_RGB_ROT270
 		  if (rotation == 270)
 		    {
-		       if ((!(w & 0x1)) && (!((int)dest & 0x3)))
+		       if ((!(w & 0x1)) && (!((intptr_t)dest & 0x3)))
 			 return evas_common_convert_rgba2_to_16bpp_rgb_444_dith_rot_270;
 		       else
 			 return evas_common_convert_rgba_to_16bpp_rgb_444_dith_rot_270;
@@ -352,7 +352,7 @@
 #ifdef BUILD_CONVERT_16_RGB_ROT90
 		  if (rotation == 90)
 		    {
-		       if ((!(w & 0x1)) && (!((int)dest & 0x3)))
+		       if ((!(w & 0x1)) && (!((intptr_t)dest & 0x3)))
 			 return evas_common_convert_rgba2_to_16bpp_rgb_444_dith_rot_90;
 		       else
 			 return evas_common_convert_rgba_to_16bpp_rgb_444_dith_rot_90;
@@ -366,7 +366,7 @@
 #ifdef BUILD_CONVERT_16_RGB_ROT0
 		  if (rotation == 0)
 		    {
-		       if ((!(w & 0x1)) && (!((int)dest & 0x3)))
+		       if ((!(w & 0x1)) && (!((intptr_t)dest & 0x3)))
 			 return evas_common_convert_rgba2_to_16bpp_rgb_454645_dith;
 		       else
 			 return evas_common_convert_rgba_to_16bpp_rgb_454645_dith;
@@ -376,7 +376,7 @@
 #ifdef BUILD_CONVERT_16_RGB_ROT180
 		  if (rotation == 180)
 		    {
-		       if ((!(w & 0x1)) && (!((int)dest & 0x3)))
+		       if ((!(w & 0x1)) && (!((intptr_t)dest & 0x3)))
 			 return evas_common_convert_rgba2_to_16bpp_rgb_454645_dith_rot_180;
 		       else
 			 return evas_common_convert_rgba_to_16bpp_rgb_454645_dith_rot_180;
@@ -385,7 +385,7 @@
 #ifdef BUILD_CONVERT_16_RGB_ROT270
 		  if (rotation == 270)
 		    {
-		       if ((!(w & 0x1)) && (!((int)dest & 0x3)))
+		       if ((!(w & 0x1)) && (!((intptr_t)dest & 0x3)))
 			 return evas_common_convert_rgba2_to_16bpp_rgb_454645_dith_rot_270;
 		       else
 			 return evas_common_convert_rgba_to_16bpp_rgb_454645_dith_rot_270;
@@ -394,7 +394,7 @@
 #ifdef BUILD_CONVERT_16_RGB_ROT90
 		  if (rotation == 270)
 		    {
-		       if ((!(w & 0x1)) && (!((int)dest & 0x3)))
+		       if ((!(w & 0x1)) && (!((intptr_t)dest & 0x3)))
 			 return evas_common_convert_rgba2_to_16bpp_rgb_454645_dith_rot_90;
 		       else
 			 return evas_common_convert_rgba_to_16bpp_rgb_454645_dith_rot_90;
@@ -408,7 +408,7 @@
 #ifdef BUILD_CONVERT_16_RGB_ROT0
 		  if (rotation == 0)
 		    {
-		       if ((!(w & 0x1)) && (!((int)dest & 0x3)))
+		       if ((!(w & 0x1)) && (!((intptr_t)dest & 0x3)))
 			 return evas_common_convert_rgba2_to_16bpp_rgb_454645_dith;
 		       else
 			 return evas_common_convert_rgba_to_16bpp_rgb_454645_dith;
@@ -418,7 +418,7 @@
 #ifdef BUILD_CONVERT_16_RGB_ROT180
 		  if (rotation == 180)
 		    {
-		       if ((!(w & 0x1)) && (!((int)dest & 0x3)))
+		       if ((!(w & 0x1)) && (!((intptr_t)dest & 0x3)))
 			 return evas_common_convert_rgba2_to_16bpp_rgb_454645_dith_rot_180;
 		       else
 			 return evas_common_convert_rgba_to_16bpp_rgb_454645_dith_rot_180;
@@ -427,7 +427,7 @@
 #ifdef BUILD_CONVERT_16_RGB_ROT270
 		  if (rotation == 270)
 		    {
-		       if ((!(w & 0x1)) && (!((int)dest & 0x3)))
+		       if ((!(w & 0x1)) && (!((intptr_t)dest & 0x3)))
 			 return evas_common_convert_rgba2_to_16bpp_rgb_454645_dith_rot_270;
 		       else
 			 return evas_common_convert_rgba_to_16bpp_rgb_454645_dith_rot_270;
@@ -436,7 +436,7 @@
 #ifdef BUILD_CONVERT_16_RGB_ROT90
 		  if (rotation == 90)
 		    {
-		       if ((!(w & 0x1)) && (!((int)dest & 0x3)))
+		       if ((!(w & 0x1)) && (!((intptr_t)dest & 0x3)))
 			 return evas_common_convert_rgba2_to_16bpp_rgb_454645_dith_rot_90;
 		       else
 			 return evas_common_convert_rgba_to_16bpp_rgb_454645_dith_rot_90;

Index: src/lib/engines/common/evas_blit_main.c
===================================================================
RCS file: /var/cvs/e/e17/libs/evas/src/lib/engines/common/evas_blit_main.c,v
retrieving revision 1.7
diff -u -r1.7 evas_blit_main.c
--- src/lib/engines/common/evas_blit_main.c	16 Jul 2007 07:29:34 -0000	1.7
+++ src/lib/engines/common/evas_blit_main.c	12 Sep 2007 02:47:14 -0000
@@ -142,11 +142,11 @@
 {
    DATA32 *dst_end, *dst_end_pre;
 #ifdef ALIGN_FIX
-   int src_align;
-   int dst_align;
+   intptr_t src_align;
+   intptr_t dst_align;
 
-   src_align = (int)src & 0x3f; /* 64 byte alignment */
-   dst_align = (int)dst & 0x3f; /* 64 byte alignment */
+   src_align = (intptr_t)src & 0x3f; /* 64 byte alignment */
+   dst_align = (intptr_t)dst & 0x3f; /* 64 byte alignment */
 
    if ((src_align != dst_align) ||
        ((src_align & 0x3) != 0))
@@ -185,11 +185,11 @@
 {
    DATA32 *dst_end, *dst_end_pre;
 #ifdef ALIGN_FIX
-   int src_align;
-   int dst_align;
+   intptr_t src_align;
+   intptr_t dst_align;
 
-   src_align = (int)src & 0x3f; /* 64 byte alignment */
-   dst_align = (int)dst & 0x3f; /* 64 byte alignment */
+   src_align = (intptr_t)src & 0x3f; /* 64 byte alignment */
+   dst_align = (intptr_t)dst & 0x3f; /* 64 byte alignment */
 
    if ((src_align != dst_align) ||
        ((src_align & 0x3) != 0))

Index: src/lib/canvas/evas_object_intercept.c
===================================================================
RCS file: /var/cvs/e/e17/libs/evas/src/lib/canvas/evas_object_intercept.c,v
retrieving revision 1.10
diff -u -r1.10 evas_object_intercept.c
--- src/lib/canvas/evas_object_intercept.c	22 Aug 2007 16:45:37 -0000	1.10
+++ src/lib/canvas/evas_object_intercept.c	12 Sep 2007 02:47:14 -0000
@@ -54,7 +54,7 @@
    if (!obj->interceptors) return 0;
    if (obj->intercepted) return 0;
    obj->intercepted = 1;
-   ret = (int)obj->interceptors->show.func;
+   ret = ((obj->interceptors->show.func) != NULL);
    if (obj->interceptors->show.func)
      obj->interceptors->show.func(obj->interceptors->show.data, obj);
    obj->intercepted = 0;
@@ -70,7 +70,7 @@
    if (!obj->interceptors) return 0;
    if (obj->intercepted) return 0;
    obj->intercepted = 1;
-   ret = (int)obj->interceptors->hide.func;
+   ret = ((obj->interceptors->hide.func) != NULL);
    if (obj->interceptors->hide.func)
      obj->interceptors->hide.func(obj->interceptors->hide.data, obj);
    obj->intercepted = 0;
@@ -86,7 +86,7 @@
    if (!obj->interceptors) return 0;
    if (obj->intercepted) return 0;
    obj->intercepted = 1;
-   ret = (int)obj->interceptors->move.func;
+   ret = ((obj->interceptors->move.func) != NULL);
    if (obj->interceptors->move.func)
      obj->interceptors->move.func(obj->interceptors->move.data, obj, x, y);
    obj->intercepted = 0;
@@ -102,7 +102,7 @@
    if (!obj->interceptors) return 0;
    if (obj->intercepted) return 0;
    obj->intercepted = 1;
-   ret = (int)obj->interceptors->resize.func;
+   ret = ((obj->interceptors->resize.func) != NULL);
    if (obj->interceptors->resize.func)
      obj->interceptors->resize.func(obj->interceptors->resize.data, obj, w, h);
    obj->intercepted = 0;
@@ -118,7 +118,7 @@
    if (!obj->interceptors) return 0;
    if (obj->intercepted) return 0;
    obj->intercepted = 1;
-   ret = (int)obj->interceptors->raise.func;
+   ret = ((obj->interceptors->raise.func) != NULL);
    if (obj->interceptors->raise.func)
      obj->interceptors->raise.func(obj->interceptors->raise.data, obj);
    obj->intercepted = 0;
@@ -134,7 +134,7 @@
    if (!obj->interceptors) return 0;
    if (obj->intercepted) return 0;
    obj->intercepted = 1;
-   ret = (int)obj->interceptors->lower.func;
+   ret = ((obj->interceptors->lower.func) != NULL);
    if (obj->interceptors->lower.func)
      obj->interceptors->lower.func(obj->interceptors->lower.data, obj);
    obj->intercepted = 0;
@@ -150,7 +150,7 @@
    if (!obj->interceptors) return 0;
    if (obj->intercepted) return 0;
    obj->intercepted = 1;
-   ret = (int)obj->interceptors->stack_above.func;
+   ret = ((obj->interceptors->stack_above.func) != NULL);
    if (obj->interceptors->stack_above.func)
      obj->interceptors->stack_above.func(obj->interceptors->stack_above.data, obj, above);
    obj->intercepted = 0;
@@ -166,7 +166,7 @@
    if (!obj->interceptors) return 0;
    if (obj->intercepted) return 0;
    obj->intercepted = 1;
-   ret = (int)obj->interceptors->stack_below.func;
+   ret = ((obj->interceptors->stack_below.func) != NULL);
    if (obj->interceptors->stack_below.func)
      obj->interceptors->stack_below.func(obj->interceptors->stack_below.data, obj, below);
    obj->intercepted = 0;
@@ -182,7 +182,7 @@
    if (!obj->interceptors) return 0;
    if (obj->intercepted) return 0;
    obj->intercepted = 1;
-   ret = (int)obj->interceptors->layer_set.func;
+   ret = ((obj->interceptors->layer_set.func) != NULL);
    if (obj->interceptors->layer_set.func)
      obj->interceptors->layer_set.func(obj->interceptors->layer_set.data, obj, l);
    obj->intercepted = 0;
@@ -198,7 +198,7 @@
    if (!obj->interceptors) return 0;
    if (obj->intercepted) return 0;
    obj->intercepted = 1;
-   ret = (int)obj->interceptors->color_set.func;
+   ret = ((obj->interceptors->color_set.func) != NULL);
    if (obj->interceptors->color_set.func)
      obj->interceptors->color_set.func(obj->interceptors->color_set.data, obj, r, g, b, a);
    obj->intercepted = 0;
@@ -214,7 +214,7 @@
    if (!obj->interceptors) return 0;
    if (obj->intercepted) return 0;
    obj->intercepted = 1;
-   ret = (int)obj->interceptors->clip_set.func;
+   ret = ((obj->interceptors->clip_set.func) != NULL);
    if (obj->interceptors->clip_set.func)
      obj->interceptors->clip_set.func(obj->interceptors->clip_set.data, obj, clip);
    obj->intercepted = 0;
@@ -230,7 +230,7 @@
    if (!obj->interceptors) return 0;
    if (obj->intercepted) return 0;
    obj->intercepted = 1;
-   ret = (int)obj->interceptors->clip_unset.func;
+   ret = ((obj->interceptors->clip_unset.func) != NULL);
    if (obj->interceptors->clip_unset.func)
      obj->interceptors->clip_unset.func(obj->interceptors->clip_unset.data, obj);
    obj->intercepted = 0;
Index: src/lib/engines/common/evas_blit_main.c
===================================================================
RCS file: /var/cvs/e/e17/libs/evas/src/lib/engines/common/evas_blit_main.c,v
retrieving revision 1.7
diff -u -r1.7 evas_blit_main.c
--- src/lib/engines/common/evas_blit_main.c	16 Jul 2007 07:29:34 -0000	1.7
+++ src/lib/engines/common/evas_blit_main.c	12 Sep 2007 02:47:14 -0000
@@ -142,11 +142,11 @@
 {
    DATA32 *dst_end, *dst_end_pre;
 #ifdef ALIGN_FIX
-   int src_align;
-   int dst_align;
+   intptr_t src_align;
+   intptr_t dst_align;
 
-   src_align = (int)src & 0x3f; /* 64 byte alignment */
-   dst_align = (int)dst & 0x3f; /* 64 byte alignment */
+   src_align = (intptr_t)src & 0x3f; /* 64 byte alignment */
+   dst_align = (intptr_t)dst & 0x3f; /* 64 byte alignment */
 
    if ((src_align != dst_align) ||
        ((src_align & 0x3) != 0))
@@ -185,11 +185,11 @@
 {
    DATA32 *dst_end, *dst_end_pre;
 #ifdef ALIGN_FIX
-   int src_align;
-   int dst_align;
+   intptr_t src_align;
+   intptr_t dst_align;
 
-   src_align = (int)src & 0x3f; /* 64 byte alignment */
-   dst_align = (int)dst & 0x3f; /* 64 byte alignment */
+   src_align = (intptr_t)src & 0x3f; /* 64 byte alignment */
+   dst_align = (intptr_t)dst & 0x3f; /* 64 byte alignment */
 
    if ((src_align != dst_align) ||
        ((src_align & 0x3) != 0))
Index: src/lib/engines/common/evas_convert_main.c
===================================================================
RCS file: /var/cvs/e/e17/libs/evas/src/lib/engines/common/evas_convert_main.c,v
retrieving revision 1.8
diff -u -r1.8 evas_convert_main.c
--- src/lib/engines/common/evas_convert_main.c	2 Mar 2007 14:51:16 -0000	1.8
+++ src/lib/engines/common/evas_convert_main.c	12 Sep 2007 02:47:17 -0000
@@ -202,7 +202,7 @@
 #ifdef BUILD_CONVERT_16_RGB_ROT0
 		  if (rotation == 0)
 		    {
-		       if ((!(w & 0x1)) && (!((int)dest & 0x3)))
+		       if ((!(w & 0x1)) && (!((intptr_t)dest & 0x3)))
 			 return evas_common_convert_rgba2_to_16bpp_rgb_565_dith;
 		       else
 			 return evas_common_convert_rgba_to_16bpp_rgb_565_dith;
@@ -211,7 +211,7 @@
 #ifdef BUILD_CONVERT_16_RGB_ROT180
 		  if (rotation == 180)
 		    {
-		       if ((!(w & 0x1)) && (!((int)dest & 0x3)))
+		       if ((!(w & 0x1)) && (!((intptr_t)dest & 0x3)))
 			 return evas_common_convert_rgba2_to_16bpp_rgb_565_dith_rot_180;
 		       else
 			 return evas_common_convert_rgba_to_16bpp_rgb_565_dith_rot_180;
@@ -220,7 +220,7 @@
 #ifdef BUILD_CONVERT_16_RGB_ROT270
 		  if (rotation == 270)
 		    {
-		       if ((!(w & 0x1)) && (!((int)dest & 0x3)))
+		       if ((!(w & 0x1)) && (!((intptr_t)dest & 0x3)))
 			 return evas_common_convert_rgba2_to_16bpp_rgb_565_dith_rot_270;
 		       else
 			 return evas_common_convert_rgba_to_16bpp_rgb_565_dith_rot_270;
@@ -229,7 +229,7 @@
 #ifdef BUILD_CONVERT_16_RGB_ROT90
 		  if (rotation == 90)
 		    {
-		       if ((!(w & 0x1)) && (!((int)dest & 0x3)))
+		       if ((!(w & 0x1)) && (!((intptr_t)dest & 0x3)))
 			 return evas_common_convert_rgba2_to_16bpp_rgb_565_dith_rot_90;
 		       else
 			 return evas_common_convert_rgba_to_16bpp_rgb_565_dith_rot_90;
@@ -243,7 +243,7 @@
 #ifdef BUILD_CONVERT_16_RGB_ROT0
 		  if (rotation == 0)
 		    {
-		       if ((!(w & 0x1)) && (!((int)dest & 0x3)))
+		       if ((!(w & 0x1)) && (!((intptr_t)dest & 0x3)))
 			 return evas_common_convert_rgba2_to_16bpp_bgr_565_dith;
 		       else
 			 return evas_common_convert_rgba_to_16bpp_bgr_565_dith;
@@ -252,7 +252,7 @@
 #ifdef BUILD_CONVERT_16_RGB_ROT180
 		  if (rotation == 180)
 		    {
-		       if ((!(w & 0x1)) && (!((int)dest & 0x3)))
+		       if ((!(w & 0x1)) && (!((intptr_t)dest & 0x3)))
 			 return evas_common_convert_rgba2_to_16bpp_bgr_565_dith_rot_180;
 		       else
 			 return evas_common_convert_rgba_to_16bpp_bgr_565_dith_rot_180;
@@ -261,7 +261,7 @@
 #ifdef BUILD_CONVERT_16_RGB_ROT270
 		  if (rotation == 270)
 		    {
-		       if ((!(w & 0x1)) && (!((int)dest & 0x3)))
+		       if ((!(w & 0x1)) && (!((intptr_t)dest & 0x3)))
 			 return evas_common_convert_rgba2_to_16bpp_bgr_565_dith_rot_270;
 		       else
 			 return evas_common_convert_rgba_to_16bpp_bgr_565_dith_rot_270;
@@ -270,7 +270,7 @@
 #ifdef BUILD_CONVERT_16_RGB_ROT90
 		  if (rotation == 90)
 		    {
-		       if ((!(w & 0x1)) && (!((int)dest & 0x3)))
+		       if ((!(w & 0x1)) && (!((intptr_t)dest & 0x3)))
 			 return evas_common_convert_rgba2_to_16bpp_bgr_565_dith_rot_90;
 		       else
 			 return evas_common_convert_rgba_to_16bpp_bgr_565_dith_rot_90;
@@ -284,7 +284,7 @@
 #ifdef BUILD_CONVERT_16_RGB_ROT0
 		  if (rotation == 0)
 		    {
-		       if ((!(w & 0x1)) && (!((int)dest & 0x3)))
+		       if ((!(w & 0x1)) && (!((intptr_t)dest & 0x3)))
 			 return evas_common_convert_rgba2_to_16bpp_rgb_555_dith;
 		       else
  			 return evas_common_convert_rgba_to_16bpp_rgb_555_dith;
@@ -293,7 +293,7 @@
 #ifdef BUILD_CONVERT_16_RGB_ROT180
 		  if (rotation == 180)
 		    {
-		       if ((!(w & 0x1)) && (!((int)dest & 0x3)))
+		       if ((!(w & 0x1)) && (!((intptr_t)dest & 0x3)))
 			 return evas_common_convert_rgba2_to_16bpp_rgb_555_dith_rot_180;
 		       else
 			 return evas_common_convert_rgba_to_16bpp_rgb_555_dith_rot_180;
@@ -302,7 +302,7 @@
 #ifdef BUILD_CONVERT_16_RGB_ROT270
 		  if (rotation == 270)
 		    {
-		       if ((!(w & 0x1)) && (!((int)dest & 0x3)))
+		       if ((!(w & 0x1)) && (!((intptr_t)dest & 0x3)))
 			 return evas_common_convert_rgba2_to_16bpp_rgb_555_dith_rot_270;
 		       else
 			 return evas_common_convert_rgba_to_16bpp_rgb_555_dith_rot_270;
@@ -311,7 +311,7 @@
 #ifdef BUILD_CONVERT_16_RGB_ROT90
 		  if (rotation == 90)
 		    {
-		       if ((!(w & 0x1)) && (!((int)dest & 0x3)))
+		       if ((!(w & 0x1)) && (!((intptr_t)dest & 0x3)))
 			 return evas_common_convert_rgba2_to_16bpp_rgb_555_dith_rot_90;
 		       else
 			 return evas_common_convert_rgba_to_16bpp_rgb_555_dith_rot_90;
@@ -325,7 +325,7 @@
 #ifdef BUILD_CONVERT_16_RGB_ROT0
 		  if (rotation == 0)
 		    {
-		       if ((!(w & 0x1)) && (!((int)dest & 0x3)))
+		       if ((!(w & 0x1)) && (!((intptr_t)dest & 0x3)))
 			 return evas_common_convert_rgba2_to_16bpp_rgb_444_dith;
 		       else
 			 return evas_common_convert_rgba_to_16bpp_rgb_444_dith;
@@ -334,7 +334,7 @@
 #ifdef BUILD_CONVERT_16_RGB_ROT180
 		  if (rotation == 180)
 		    {
-		       if ((!(w & 0x1)) && (!((int)dest & 0x3)))
+		       if ((!(w & 0x1)) && (!((intptr_t)dest & 0x3)))
 			 return evas_common_convert_rgba2_to_16bpp_rgb_444_dith_rot_180;
 		       else
 			 return evas_common_convert_rgba_to_16bpp_rgb_444_dith_rot_180;
@@ -343,7 +343,7 @@
 #ifdef BUILD_CONVERT_16_RGB_ROT270
 		  if (rotation == 270)
 		    {
-		       if ((!(w & 0x1)) && (!((int)dest & 0x3)))
+		       if ((!(w & 0x1)) && (!((intptr_t)dest & 0x3)))
 			 return evas_common_convert_rgba2_to_16bpp_rgb_444_dith_rot_270;
 		       else
 			 return evas_common_convert_rgba_to_16bpp_rgb_444_dith_rot_270;
@@ -352,7 +352,7 @@
 #ifdef BUILD_CONVERT_16_RGB_ROT90
 		  if (rotation == 90)
 		    {
-		       if ((!(w & 0x1)) && (!((int)dest & 0x3)))
+		       if ((!(w & 0x1)) && (!((intptr_t)dest & 0x3)))
 			 return evas_common_convert_rgba2_to_16bpp_rgb_444_dith_rot_90;
 		       else
 			 return evas_common_convert_rgba_to_16bpp_rgb_444_dith_rot_90;
@@ -366,7 +366,7 @@
 #ifdef BUILD_CONVERT_16_RGB_ROT0
 		  if (rotation == 0)
 		    {
-		       if ((!(w & 0x1)) && (!((int)dest & 0x3)))
+		       if ((!(w & 0x1)) && (!((intptr_t)dest & 0x3)))
 			 return evas_common_convert_rgba2_to_16bpp_rgb_454645_dith;
 		       else
 			 return evas_common_convert_rgba_to_16bpp_rgb_454645_dith;
@@ -376,7 +376,7 @@
 #ifdef BUILD_CONVERT_16_RGB_ROT180
 		  if (rotation == 180)
 		    {
-		       if ((!(w & 0x1)) && (!((int)dest & 0x3)))
+		       if ((!(w & 0x1)) && (!((intptr_t)dest & 0x3)))
 			 return evas_common_convert_rgba2_to_16bpp_rgb_454645_dith_rot_180;
 		       else
 			 return evas_common_convert_rgba_to_16bpp_rgb_454645_dith_rot_180;
@@ -385,7 +385,7 @@
 #ifdef BUILD_CONVERT_16_RGB_ROT270
 		  if (rotation == 270)
 		    {
-		       if ((!(w & 0x1)) && (!((int)dest & 0x3)))
+		       if ((!(w & 0x1)) && (!((intptr_t)dest & 0x3)))
 			 return evas_common_convert_rgba2_to_16bpp_rgb_454645_dith_rot_270;
 		       else
 			 return evas_common_convert_rgba_to_16bpp_rgb_454645_dith_rot_270;
@@ -394,7 +394,7 @@
 #ifdef BUILD_CONVERT_16_RGB_ROT90
 		  if (rotation == 270)
 		    {
-		       if ((!(w & 0x1)) && (!((int)dest & 0x3)))
+		       if ((!(w & 0x1)) && (!((intptr_t)dest & 0x3)))
 			 return evas_common_convert_rgba2_to_16bpp_rgb_454645_dith_rot_90;
 		       else
 			 return evas_common_convert_rgba_to_16bpp_rgb_454645_dith_rot_90;
@@ -408,7 +408,7 @@
 #ifdef BUILD_CONVERT_16_RGB_ROT0
 		  if (rotation == 0)
 		    {
-		       if ((!(w & 0x1)) && (!((int)dest & 0x3)))
+		       if ((!(w & 0x1)) && (!((intptr_t)dest & 0x3)))
 			 return evas_common_convert_rgba2_to_16bpp_rgb_454645_dith;
 		       else
 			 return evas_common_convert_rgba_to_16bpp_rgb_454645_dith;
@@ -418,7 +418,7 @@
 #ifdef BUILD_CONVERT_16_RGB_ROT180
 		  if (rotation == 180)
 		    {
-		       if ((!(w & 0x1)) && (!((int)dest & 0x3)))
+		       if ((!(w & 0x1)) && (!((intptr_t)dest & 0x3)))
 			 return evas_common_convert_rgba2_to_16bpp_rgb_454645_dith_rot_180;
 		       else
 			 return evas_common_convert_rgba_to_16bpp_rgb_454645_dith_rot_180;
@@ -427,7 +427,7 @@
 #ifdef BUILD_CONVERT_16_RGB_ROT270
 		  if (rotation == 270)
 		    {
-		       if ((!(w & 0x1)) && (!((int)dest & 0x3)))
+		       if ((!(w & 0x1)) && (!((intptr_t)dest & 0x3)))
 			 return evas_common_convert_rgba2_to_16bpp_rgb_454645_dith_rot_270;
 		       else
 			 return evas_common_convert_rgba_to_16bpp_rgb_454645_dith_rot_270;
@@ -436,7 +436,7 @@
 #ifdef BUILD_CONVERT_16_RGB_ROT90
 		  if (rotation == 90)
 		    {
-		       if ((!(w & 0x1)) && (!((int)dest & 0x3)))
+		       if ((!(w & 0x1)) && (!((intptr_t)dest & 0x3)))
 			 return evas_common_convert_rgba2_to_16bpp_rgb_454645_dith_rot_90;
 		       else
 			 return evas_common_convert_rgba_to_16bpp_rgb_454645_dith_rot_90;
Index: src/lib/engines/common/evas_draw_main.c
===================================================================
RCS file: /var/cvs/e/e17/libs/evas/src/lib/engines/common/evas_draw_main.c,v
retrieving revision 1.22
diff -u -r1.22 evas_draw_main.c
--- src/lib/engines/common/evas_draw_main.c	30 Apr 2007 04:23:47 -0000	1.22
+++ src/lib/engines/common/evas_draw_main.c	12 Sep 2007 02:47:18 -0000
@@ -1,7 +1,7 @@
 #include "evas_common.h"
 
 EAPI Cutout_Rects*
-evas_common_draw_context_cutouts_new()
+evas_common_draw_context_cutouts_new(void)
 {
    Cutout_Rects *rects;
 
Index: src/lib/engines/common/evas_font_main.c
===================================================================
RCS file: /var/cvs/e/e17/libs/evas/src/lib/engines/common/evas_font_main.c,v
retrieving revision 1.29
diff -u -r1.29 evas_font_main.c
--- src/lib/engines/common/evas_font_main.c	27 Jun 2007 14:56:14 -0000	1.29
+++ src/lib/engines/common/evas_font_main.c	12 Sep 2007 02:47:18 -0000
@@ -185,7 +185,7 @@
    int index = *iindex, len, r;
    unsigned char d, d2, d3, d4;
 
-   if (iindex <= 0)
+   if (index <= 0)
      return 0;
    d = buf[index--];
    
Index: src/modules/engines/fb/evas_fb_main.c
===================================================================
RCS file: /var/cvs/e/e17/libs/evas/src/modules/engines/fb/evas_fb_main.c,v
retrieving revision 1.6
diff -u -r1.6 evas_fb_main.c
--- src/modules/engines/fb/evas_fb_main.c	13 Mar 2007 23:10:59 -0000	1.6
+++ src/modules/engines/fb/evas_fb_main.c	12 Sep 2007 02:47:19 -0000
@@ -535,7 +535,7 @@
   mode->mem_offset = (unsigned)(fb_fix.smem_start) & (getpagesize()-1);
   mode->mem = (unsigned char *)mmap(NULL, fb_fix.smem_len + mode->mem_offset,
 				 PROT_WRITE | PROT_READ, MAP_SHARED, fb, 0);
-  if ((int)mode->mem == -1)
+  if ((intptr_t)mode->mem == -1)
     {
       perror("mmap");
       fb_cleanup();
Index: src/modules/engines/software_x11/evas_outbuf.c
===================================================================
RCS file: /var/cvs/e/e17/libs/evas/src/modules/engines/software_x11/evas_outbuf.c,v
retrieving revision 1.11
diff -u -r1.11 evas_outbuf.c
--- src/modules/engines/software_x11/evas_outbuf.c	16 Jul 2007 07:25:34 -0000	1.11
+++ src/modules/engines/software_x11/evas_outbuf.c	12 Sep 2007 02:47:20 -0000
@@ -13,7 +13,8 @@
 evas_software_x11_outbuf_free(Outbuf * buf)
 {
    evas_software_x11_outbuf_flush(buf);
-   XFreeGC(buf->priv.x.disp, buf->priv.x.gc);
+   if (buf->priv.x.gc)
+      XFreeGC(buf->priv.x.disp, buf->priv.x.gc);
    if (buf->priv.x.gcm)
       XFreeGC(buf->priv.x.disp, buf->priv.x.gcm);
    if (buf->priv.pal)
Index: src/modules/engines/software_x11/evas_outbuf.c
===================================================================
RCS file: /var/cvs/e/e17/libs/evas/src/modules/engines/software_x11/evas_outbuf.c,v
retrieving revision 1.11
diff -u -r1.11 evas_outbuf.c
--- src/modules/engines/software_x11/evas_outbuf.c	16 Jul 2007 07:25:34 -0000	1.11
+++ src/modules/engines/software_x11/evas_outbuf.c	12 Sep 2007 02:47:20 -0000
@@ -13,7 +13,8 @@
 evas_software_x11_outbuf_free(Outbuf * buf)
 {
    evas_software_x11_outbuf_flush(buf);
-   XFreeGC(buf->priv.x.disp, buf->priv.x.gc);
+   if (buf->priv.x.gc)
+      XFreeGC(buf->priv.x.disp, buf->priv.x.gc);
    if (buf->priv.x.gcm)
       XFreeGC(buf->priv.x.disp, buf->priv.x.gcm);
    if (buf->priv.pal)
Index: src/lib/engines/common/evas_font_main.c
===================================================================
RCS file: /var/cvs/e/e17/libs/evas/src/lib/engines/common/evas_font_main.c,v
retrieving revision 1.29
diff -u -r1.29 evas_font_main.c
--- src/lib/engines/common/evas_font_main.c	27 Jun 2007 14:56:14 -0000	1.29
+++ src/lib/engines/common/evas_font_main.c	12 Sep 2007 02:47:18 -0000
@@ -185,7 +185,7 @@
    int index = *iindex, len, r;
    unsigned char d, d2, d3, d4;
 
-   if (iindex <= 0)
+   if (index <= 0)
      return 0;
    d = buf[index--];

Index: src/lib/canvas/evas_object_intercept.c
===================================================================
RCS file: /var/cvs/e/e17/libs/evas/src/lib/canvas/evas_object_intercept.c,v
retrieving revision 1.10
diff -u -r1.10 evas_object_intercept.c
--- src/lib/canvas/evas_object_intercept.c	22 Aug 2007 16:45:37 -0000	1.10
+++ src/lib/canvas/evas_object_intercept.c	12 Sep 2007 02:47:14 -0000
@@ -54,7 +54,7 @@
    if (!obj->interceptors) return 0;
    if (obj->intercepted) return 0;
    obj->intercepted = 1;
-   ret = (int)obj->interceptors->show.func;
+   ret = ((obj->interceptors->show.func) != NULL);
    if (obj->interceptors->show.func)
      obj->interceptors->show.func(obj->interceptors->show.data, obj);
    obj->intercepted = 0;
@@ -70,7 +70,7 @@
    if (!obj->interceptors) return 0;
    if (obj->intercepted) return 0;
    obj->intercepted = 1;
-   ret = (int)obj->interceptors->hide.func;
+   ret = ((obj->interceptors->hide.func) != NULL);
    if (obj->interceptors->hide.func)
      obj->interceptors->hide.func(obj->interceptors->hide.data, obj);
    obj->intercepted = 0;
@@ -86,7 +86,7 @@
    if (!obj->interceptors) return 0;
    if (obj->intercepted) return 0;
    obj->intercepted = 1;
-   ret = (int)obj->interceptors->move.func;
+   ret = ((obj->interceptors->move.func) != NULL);
    if (obj->interceptors->move.func)
      obj->interceptors->move.func(obj->interceptors->move.data, obj, x, y);
    obj->intercepted = 0;
@@ -102,7 +102,7 @@
    if (!obj->interceptors) return 0;
    if (obj->intercepted) return 0;
    obj->intercepted = 1;
-   ret = (int)obj->interceptors->resize.func;
+   ret = ((obj->interceptors->resize.func) != NULL);
    if (obj->interceptors->resize.func)
      obj->interceptors->resize.func(obj->interceptors->resize.data, obj, w, h);
    obj->intercepted = 0;
@@ -118,7 +118,7 @@
    if (!obj->interceptors) return 0;
    if (obj->intercepted) return 0;
    obj->intercepted = 1;
-   ret = (int)obj->interceptors->raise.func;
+   ret = ((obj->interceptors->raise.func) != NULL);
    if (obj->interceptors->raise.func)
      obj->interceptors->raise.func(obj->interceptors->raise.data, obj);
    obj->intercepted = 0;
@@ -134,7 +134,7 @@
    if (!obj->interceptors) return 0;
    if (obj->intercepted) return 0;
    obj->intercepted = 1;
-   ret = (int)obj->interceptors->lower.func;
+   ret = ((obj->interceptors->lower.func) != NULL);
    if (obj->interceptors->lower.func)
      obj->interceptors->lower.func(obj->interceptors->lower.data, obj);
    obj->intercepted = 0;
@@ -150,7 +150,7 @@
    if (!obj->interceptors) return 0;
    if (obj->intercepted) return 0;
    obj->intercepted = 1;
-   ret = (int)obj->interceptors->stack_above.func;
+   ret = ((obj->interceptors->stack_above.func) != NULL);
    if (obj->interceptors->stack_above.func)
      obj->interceptors->stack_above.func(obj->interceptors->stack_above.data, obj, above);
    obj->intercepted = 0;
@@ -166,7 +166,7 @@
    if (!obj->interceptors) return 0;
    if (obj->intercepted) return 0;
    obj->intercepted = 1;
-   ret = (int)obj->interceptors->stack_below.func;
+   ret = ((obj->interceptors->stack_below.func) != NULL);
    if (obj->interceptors->stack_below.func)
      obj->interceptors->stack_below.func(obj->interceptors->stack_below.data, obj, below);
    obj->intercepted = 0;
@@ -182,7 +182,7 @@
    if (!obj->interceptors) return 0;
    if (obj->intercepted) return 0;
    obj->intercepted = 1;
-   ret = (int)obj->interceptors->layer_set.func;
+   ret = ((obj->interceptors->layer_set.func) != NULL);
    if (obj->interceptors->layer_set.func)
      obj->interceptors->layer_set.func(obj->interceptors->layer_set.data, obj, l);
    obj->intercepted = 0;
@@ -198,7 +198,7 @@
    if (!obj->interceptors) return 0;
    if (obj->intercepted) return 0;
    obj->intercepted = 1;
-   ret = (int)obj->interceptors->color_set.func;
+   ret = ((obj->interceptors->color_set.func) != NULL);
    if (obj->interceptors->color_set.func)
      obj->interceptors->color_set.func(obj->interceptors->color_set.data, obj, r, g, b, a);
    obj->intercepted = 0;
@@ -214,7 +214,7 @@
    if (!obj->interceptors) return 0;
    if (obj->intercepted) return 0;
    obj->intercepted = 1;
-   ret = (int)obj->interceptors->clip_set.func;
+   ret = ((obj->interceptors->clip_set.func) != NULL);
    if (obj->interceptors->clip_set.func)
      obj->interceptors->clip_set.func(obj->interceptors->clip_set.data, obj, clip);
    obj->intercepted = 0;
@@ -230,7 +230,7 @@
    if (!obj->interceptors) return 0;
    if (obj->intercepted) return 0;
    obj->intercepted = 1;
-   ret = (int)obj->interceptors->clip_unset.func;
+   ret = ((obj->interceptors->clip_unset.func) != NULL);
    if (obj->interceptors->clip_unset.func)
      obj->interceptors->clip_unset.func(obj->interceptors->clip_unset.data, obj);
    obj->intercepted = 0;

Index: src/modules/engines/fb/evas_fb_main.c
===================================================================
RCS file: /var/cvs/e/e17/libs/evas/src/modules/engines/fb/evas_fb_main.c,v
retrieving revision 1.6
diff -u -r1.6 evas_fb_main.c
--- src/modules/engines/fb/evas_fb_main.c	13 Mar 2007 23:10:59 -0000	1.6
+++ src/modules/engines/fb/evas_fb_main.c	12 Sep 2007 02:47:19 -0000
@@ -535,7 +535,7 @@
   mode->mem_offset = (unsigned)(fb_fix.smem_start) & (getpagesize()-1);
   mode->mem = (unsigned char *)mmap(NULL, fb_fix.smem_len + mode->mem_offset,
 				 PROT_WRITE | PROT_READ, MAP_SHARED, fb, 0);
-  if ((int)mode->mem == -1)
+  if ((intptr_t)mode->mem == -1)
     {
       perror("mmap");
       fb_cleanup();
-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2005.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
enlightenment-devel mailing list
enlightenment-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel

Reply via email to