Re: invalid cast from 'GtkButton' to 'GtkEntry'

You can use the widget to silence the warning.

g_print("Button %s, Entry %s\n", gtk_button_get_label(GTK_BUTTON(widget)), gtk_entry_get_text(GTK_ENTRY(data)));

When you use -Wall and -Wextra the compiler might show you some things that are considered false positives. They are warnings and if you understand why they come up then you might not need to worry about them. If you just use -Wall it compiles without warning.

Check the GCC documentation

and go to -Wall. There is a short description of this. "Note that some warning flags..."


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