RE: [gtk-list] gcc warning




Thats beacuse it's expecting a pointer, and 0 is an acceptable value.
Try the following:

gtk_signal_connect_after ( GTK_OBJECT(menuitem), "toggled",
                              GTK_SIGNAL_FUNC(my_function),
                              GINT_TO_POINTER(TRUE));

and use GPOINTER_TO_INT() in the callback.

-tony


On 05-Feb-99 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);
> 
> 
> Can anyone give me an explanation ?
> -- 
> Marc
> "He's Conan, Cimmerian, he won't cry, so I cry for him."
> ** ERROR **: sigsegv caught
> 
> -- 
> To unsubscribe: mail -s unsubscribe gtk-list-request@redhat.com <
> /dev/null

---
E-Mail: trog@gtk.org
There is an old time toast which is golden for its beauty.
"When you ascend the hill of prosperity may you not meet a friend."
		-- Mark Twain

Go Bezerk! http://www.gtk.org/~trog



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]