Re: cong-editor-widget3.c:1502: warning: cast from pointer to integer of different size
David Malcolm <[email protected]> Wed, 02 Jul 2008 10:55:48 -0400
| Newsgroups | gmane.editors.conglomerate.devel |
|---|---|
| Message-ID | <[email protected]> |
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 di=
fferent size make[2]: *** [cong-editor-widget3.o] Error 1
> =
> =
> The source code is
> |static void
> |set_editor_node_selection (CongEditorWidget3 *widget,
> | CongEditorNode *editor_node,
> | gpointer user_data)
> |{
> | cong_editor_node_private_set_selected (editor_node,
> | (gboolean)user_data);
> |}
> =
> Why is an cast from gpointer into gboolean done?
> And more important: What is needed to get it fixed?
> =
Looking at =
http://svn.gnome.org/viewvc/conglomerate/trunk/src/cong-editor-widget3.c?vi=
ew=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