Skip to content
GitLab
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
  • vala vala
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 769
    • Issues 769
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 75
    • Merge requests 75
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Releases
  • Packages and registries
    • Packages and registries
    • Container Registry
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • External wiki
    • External wiki
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • GNOMEGNOME
  • valavala
  • Issues
  • #169
Closed
Open
Issue created Feb 18, 2011 by Bugzilla@bugzilla-migration💬Reporter

Unused static function generated when using lists of objects

Submitted by Robert Ancell @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

  • Bug 664084
Edited Aug 17, 2020 by Rico Tzschichholz
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information
Assignee
Assign to
Time tracking