Re: [gtk-list] gcc warning
- From: Jeff Garzik <jgarzik pobox com>
- To: gtk-list <gtk-list redhat com>
- Subject: Re: [gtk-list] gcc warning
- Date: Fri, 5 Feb 1999 09:35:33 -0500 (EST)
On Fri, 5 Feb 1999, Marc wrote:
> gcc gives me the following warning :
>
> warning: passing arg 4 of `gtk_signal_connect_after' makes pointer from
> integer without a cast
>
> Here is the line involved :
>
> gtk_signal_connect_after ( GTK_OBJECT(menuitem), "toggled",
> GTK_SIGNAL_FUNC(my_function), (gint)TRUE);
>
> but it says nothing for (a few lines below) :
>
> gtk_signal_connect_after ( GTK_OBJECT(menuitem), "toggled",
> GTK_SIGNAL_FUNC(my_function), (gint)FALSE);
Zero, which is the value of FALSE, is a magic value like that.
In practice, you should _always_ cast integers to pointers, and pointers
to integers, with the Glib macros:
gtk_signal_connect_after ( GTK_OBJECT(menuitem), "toggled",
GTK_SIGNAL_FUNC(my_function),
GINT_TO_POINTER (TRUE) );
Jeff
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]