I need to get the value of a user selected range. The code below returns the values I want, but there are warnings. Is there a better way to write the code to avoid warnings? If not, then what can I do to surpress the warnings?
Code:
void get_user_input (GtkButton *button, gpointer user_data)
{
gdouble start_sun, end_sun;
GtkRange *hscale_start_sun = lookup_widget(GTK_WIDGET(button), "hscale_start_sun");
GtkRange *hscale_end_sun = lookup_widget(GTK_WIDGET(button), "hscale_end_sun");
start_sun = (gdouble)gtk_range_get_adjustment (hscale_start_sun)->value;
end_sun = (gdouble)gtk_range_get_adjustment (hscale_end_sun)->value;
}
When compiled the code above creates this warning for both the GtkRange lines:
Code:
callbacks.c: In function `get_user_input':
callbacks.c:89: warning: initialization from incompatible pointer type
callbacks.c:90: warning: initialization from incompatible pointer type
-- Tony
P.S. I have to use glade-1.2x and glib-1x because the system uses RedHat 7.2