Re: cong-editor-widget3.c:1502: warning: cast from pointer to integer of different size

Geert Stappers <[email protected]> Wed, 2 Jul 2008 17:37:31 +0200
Newsgroups gmane.editors.conglomerate.devel
Message-ID <[email protected]>
Op 02-07-2008 om 10:55 schreef David Malcolm:
> On Wed, 2008-07-02 at 16:50 +0200, Geert Stappers wrote:
> > Hello,
> > =

> > While compile conglomerate on an AMD64 Linux computer I got this error:
> > =

> > | cc1: warnings being treated as errors
> > | cong-editor-widget3.c: In function 'set_editor_node_selection':
> > | cong-editor-widget3.c:1502: warning: cast from pointer to integer of =
different size make[2]: *** [cong-editor-widget3.o] Error 1
> > =

> =

> Looking at =

> http://svn.gnome.org/viewvc/conglomerate/trunk/src/cong-editor-widget3.c?=
view=3Dmarkup
> both places that call the callback pass user_data using
> GUINT_TO_POINTER, so replacing the
>   (gboolean)user_data
> with:
>   GPOINTER_TO_UINT(user_data)
> should work and fix this on both 32/64 bit archs

Index: src/cong-editor-widget3.c
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- src/cong-editor-widget3.c	(revision 2167)
+++ src/cong-editor-widget3.c	(working copy)
@@ -1499,7 +1499,7 @@
 			   gpointer user_data)
 {
 	cong_editor_node_private_set_selected (editor_node,
-					       (gboolean)user_data);
+					        GPOINTER_TO_UINT(user_data));
 }
 =

 static void on_signal_selection_change_notify_after (CongDocument *doc, =



Got me a clean compile the 64-bit architecture ( not checked on 32-bit )

Thank you Dave


Cheers
Geert Stappers