Typecast error

2001-03-13 Thread CyborgHead
Hello All. I have a tiny problem, that doesn't really matter, but I would like it to be fixed. In my program I have the following command gtk_signal_connect( GTK_OBJECT( robot_name[1] ), "clicked", GTK_SIGNAL_FUNC( display_info ), 1 ); which calls the following function void display_

Re: Typecast error

2001-03-13 Thread John Cupitt
[EMAIL PROTECTED] wrote: > gtk_signal_connect( GTK_OBJECT( robot_name[1] ), "clicked", > GTK_SIGNAL_FUNC( display_info ), 1 ); > > gui.h:873: cannot convert `int' to `void *' for argument `4' to > `gtk_signal_connect (GtkObject *, const gchar *, void (*) (), void *)' Hi Ciaran, there are

Re: Typecast error

2001-03-13 Thread Dwight Tuinstra
On Tuesday 13 March 2001 06:26, [EMAIL PROTECTED] wrote: > Hello All. > I have a tiny problem, that doesn't really matter, but I would like > it to be fixed. In my program I have the following command > > gtk_signal_connect( GTK_OBJECT( robot_name[1] ), "clicked", > GTK_SIGNAL_FUNC( disp

Re: Typecast error

2001-03-13 Thread Havoc Pennington
Dwight Tuinstra <[EMAIL PROTECTED]> writes: > > This program compiles and creates an executable which works > > correctly, ie. ithe int is successfully passed to the function, > > however I get this warning, which I would like to fix > > > > gui.h:873: cannot convert `int' to `void *' for argument

Re: Typecast error

2001-03-14 Thread Dwight Tuinstra
On Tuesday 13 March 2001 22:33, Havoc Pennington wrote: > Dwight Tuinstra <[EMAIL PROTECTED]> writes: > > It wants a pointer to something, so, we give it one: > > > > gint dummy_int = 1; > > gtk_signal_connect( GTK_OBJECT( robot_name[1] ), "clicked", > > GTK_SIGNAL_FUNC( display_info

Re: Typecast error

2001-03-14 Thread Havoc Pennington
Dwight Tuinstra <[EMAIL PROTECTED]> writes: > You're right about a pointer to random data. But casting > pointers to ints, and vice-versa, has always seemed to me > a horrible abuse of the type system (I guess I've been > overly influenced by contact with the ML language's Vorlon- > strict typ