GNOME Bugzilla – Bug 652553
C warnings from gtk_menu_attach_to_widget binding (missing cast)
Last modified: 2018-05-22 14:04:09 UTC
Created attachment 189895 [details] Test case When i use gtk_menu_attach_to_widget (attached testcase) i get the following warnings: $ valac --pkg=gtk+-3.0 src/test.vala /vcs/gnome/gnome-contacts/src/test.vala.c: In function ‘_test_menu_detach_gtk_menu_detach_func’: /vcs/gnome/gnome-contacts/src/test.vala.c:53:2: warning: passing argument 1 of ‘test_menu_detach’ from incompatible pointer type [enabled by default] /vcs/gnome/gnome-contacts/src/test.vala.c:46:13: note: expected ‘struct Test *’ but argument is of type ‘struct GtkWidget *’ The problem is that the callback type gets a widget, but the callback is on a widget subclass, so the pointer type is wrong and needs a downcast.
-- GitLab Migration Automatic Message -- This bug has been migrated to GNOME's GitLab instance and has been closed from further activity. You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.gnome.org/GNOME/vala/issues/207.