After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 652553 - C warnings from gtk_menu_attach_to_widget binding (missing cast)
C warnings from gtk_menu_attach_to_widget binding (missing cast)
Status: RESOLVED OBSOLETE
Product: vala
Classification: Core
Component: Code Generator
unspecified
Other Linux
: Normal normal
: ---
Assigned To: Vala maintainers
Vala maintainers
Depends on:
Blocks: 664084
 
 
Reported: 2011-06-14 12:14 UTC by Alexander Larsson
Modified: 2018-05-22 14:04 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Test case (260 bytes, text/plain)
2011-06-14 12:14 UTC, Alexander Larsson
Details

Description Alexander Larsson 2011-06-14 12:14:14 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.
Comment 1 GNOME Infrastructure Team 2018-05-22 14:04:09 UTC
-- 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.