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 642651 - Unused static function generated when using lists of objects
Unused static function generated when using lists of objects
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-02-18 06:09 UTC by Robert Ancell
Modified: 2018-05-22 13:55 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Robert Ancell 2011-02-18 06:09:33 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
Comment 1 Luca Bruno 2011-06-11 06:31:48 UTC
It is used in vala master, can you confirm?
Comment 2 Luca Bruno 2011-06-11 06:35:02 UTC
(In reply to comment #1)
> It is used in vala master, can you confirm?

I was wrong, in foo.c it is unused sorry.
Comment 3 GNOME Infrastructure Team 2018-05-22 13:55:17 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/169.