GNOME Bugzilla – Bug 642651
Unused static function generated when using lists of objects
Last modified: 2018-05-22 13:55:17 UTC
The static function _g_list_free__g_object_unref0_ is generated if you have a method that returns a list of objects, regardless if anything in that module uses the method. Test case create two files: ---test.vala--- class Test { public static int main (string[] args) { var foo = new Foo (); foo.get_children (); return 0; } } ---foo.vala--- class Foo : Object { public List<Foo> get_children () { List<Foo> data = null; return data; } } ------------ And compile with -Wall: $ valac -C test.vala foo.vala $ gcc -Wall test.c foo.c `pkg-config --cflags --libs gobject-2.0` foo.c:49:13: warning: ‘_g_list_free__g_object_unref0_’ defined but not used
It is used in vala master, can you confirm?
(In reply to comment #1) > It is used in vala master, can you confirm? I was wrong, in foo.c it is unused sorry.
-- 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/169.