Unused static function generated when using lists of objects
@robert.ancell
Submitted by Robert Ancell Link to original bug (#642651)
Description
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
Blocking
Edited by Rico Tzschichholz