I am using the 'g_timeout_add_seconds' in my code. But when i compile the following error is shown
warning: passing argument 2 of 'g_timeout_add_seconds'
g_timeout_add_seconds(1, message_cb, data); //usage
gboolean message_cb(List *data) //prototype
I am using the 'g_timeout_add_seconds' in my code. But when i compile the following error is shown
warning: passing argument 2 of 'g_timeout_add_seconds'
g_timeout_add_seconds(1, message_cb, data); //usage
gboolean message_cb(List *data) //prototype
 
    
     
    
    Don't get rid of the warning - fix it.
The second parameter of g_timeout_add_seconds is a function pointer (GSourceFunc) as follows:
gboolean (*GSourceFunc) (gpointer user_data);
and gpointer is a pointer to void It's not keen on you using List* data instead.
Stick to the prototype and if you are passing a List* then cast it within the callback.
