Skip to content
GitLab
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Register
  • Sign in
  • G GLib
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 853
    • Issues 853
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 54
    • Merge requests 54
  • 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
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • GNOMEGNOME
  • GLib
  • Issues
  • #2758
Closed
Open
Issue created Sep 19, 2022 by Peter Williams@pkgwContributor

gmessages.c compile failure with -Werror=unused-result

As per this conda-forge build log, we're seeing a compile failure due to an unused-result issue:

../glib/gmessages.c: In function 'write_string_sized':
../glib/gmessages.c:616:5: error: ignoring return value of 'fwrite' declared with attribute 'warn_unused_result' [-Werror=unused-result]
   616 |     fwrite (string, 1, length, stream);
       |     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

This code has been around for a very long time, so I guess maybe someone only added the unused-result annotation to fwrite recently?

This is gcc 10.4 on Linux (x86_64).

Assignee
Assign to
Time tracking