GNOME Bugzilla – Bug 539483
GCC warning when using array of Gtk.ActionEntry with callback specified
Last modified: 2008-06-22 13:22:42 UTC
I get this warning from gcc: test.c:28: warning: initialization from incompatible pointer type When using compiling the following code. The on_test_command callback is not properly cast with G_CALLBACK() when initializing the static array in the C code. /* * valac --pkg gtk+-2.0 -o test test.vala */ using GLib; using Gtk; namespace Test { public class Test : GLib.Object { private ActionGroup actions; private static const ActionEntry[] COMMAND_ACTIONS = { { "test-command", null, "Test Command", "", "Description of test command.", on_test_command } }; construct { actions = new ActionGroup("test-group"); actions.add_actions(COMMAND_ACTIONS, this); } private void on_test_command (Action action) { stdout.printf ("blah\n"); } public static void main(string[] args) { var test = new Test(); } } }
Possibly a dupe of 526874?
Thanks for the bug report. This particular bug has already been reported into our bug tracking system, but please feel free to report any further bugs you find. *** This bug has been marked as a duplicate of 526874 ***