Skip to content

GitLab

  • Projects
  • Groups
  • Snippets
  • Help
    • Loading...
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in
vala
vala
  • Project overview
    • Project overview
    • Details
    • Activity
    • Releases
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 702
    • Issues 702
    • List
    • Boards
    • Labels
    • Service Desk
    • Milestones
  • Merge Requests 39
    • Merge Requests 39
  • Operations
    • Operations
    • Incidents
  • Packages & Registries
    • Packages & Registries
    • Container Registry
  • Analytics
    • Analytics
    • Repository
    • Value Stream
  • External Wiki
    • External Wiki
  • Members
    • Members
  • Collapse sidebar
  • Activity
  • Graph
  • Create a new issue
  • Commits
  • Issue Boards
  • GNOME
  • valavala
  • Issues
  • #465

Closed
Open
Opened Aug 09, 2014 by bugzilla-migration@bugzilla-migrationReporter

GCC warnings on GLib.File.load_contents

Submitted by Raphael Isemann

Link to original bug (#734516)

Description

GLib.File.load_contents produces a warning[1] on gcc with the current vapi in valac 0.24.

The warning appears for example in the test-program here: http://valadoc.org/#!api=gio-2.0/GLib.File.load_contents

I attached a patch that fixes the warning but breaks backward-compatibility with existing code.

[1] the warning

##############
teemperor@teemperor-desktop:~/workspace/test$ valac test.vala --pkg gio-2.0
/home/teemperor/workspace/test/test.vala.c: In function ‘_vala_main’:
/home/teemperor/workspace/test/test.vala.c:64:3: warning: passing argument 3 of ‘g_file_load_contents’ from incompatible pointer type [enabled by default]
   g_file_load_contents (_tmp7_, NULL, &_tmp8_, &_tmp9_, &_tmp10_, &_inner_error_);
   ^
In file included from /usr/include/glib-2.0/gio/gio.h:65:0,
                 from /home/teemperor/workspace/test/test.vala.c:10:
/usr/include/glib-2.0/gio/gfile.h:1179:10: note: expected ‘char **’ but argument is of type ‘guint8 **’
 gboolean g_file_load_contents                (GFile                  *file,
          ^
################
Edited Feb 21, 2019 by Corentin Noël
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information
Assignee
Assign to
None
Milestone
None
Assign milestone
Time tracking
None
Due date
None
Reference: GNOME/vala#465