Re: [gtk-list] *REALLY* easy question for ya..



On Tue, 4 May 1999, Daniel J. Kressin wrote:

> I don't like compiler warnings, and I've got one I can't seem to get rid
> of.  Given the following code:
> 
> -->
> gint bounceSlider(gpointer *data);
> 
> (and later on)
> 
> trigger = gtk_timeout_add(250, bounceSlider, v_error);
> -->
> 
> I'm getting a "warning: passing arg 2 of `gtk_timeout_add' from 
> incompatible pointer type" message.  None of the gtk_timeout_add()
> examples I've seen cast the second arg to anything special.  What is wrong
> with this?

you're passing in a function that expects a pointer to a pointer as
argument, while a function is expected that expects a plain pointer
argument.
try this:

static gint bounceSlider (gpointer data);

trigger = gtk_timeout_add (250, bounceSlider, v_error);

> 
> Dan 
> 

---
ciaoTJ



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