Re: void value not ignored



Matt Gerginski wrote:

hi guys.  I cant figure this one out.  GCC gives me this:

gnomoradio-prefs.c:70: void value not ignored as it ought to be


Here is the code that it is complaining about:


if (gtk_toggle_button_toggled(GTK_TOGGLE_BUTTON(elasped_radio))) { gnome_config_set_string("~/.gnome/gnomoradio/Preferences/timer",
"elasped");
} else {
        gnome_config_set_string("~/.gnome/gnomoradio/Preferences/timer",
"remaining"); }


This is as it should be - "gtk_toggle_button_toggled()" causes the button to flip its state. It returns void, so you can't use it in your if statement. You probably want "gtk_toggle_button_get_active()" instead.

Regards,
Timothy M. Shead





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