Skip to content
GitLab
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Register
  • Sign in
  • G gnome-desktop-testing
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 3
    • Issues 3
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 3
    • Merge requests 3
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Packages and registries
    • Packages and registries
    • Container Registry
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • GNOMEGNOME
  • gnome-desktop-testing
  • Merge requests
  • !6

Fix compiler warnings

  • Review changes

  • Download
  • Email patches
  • Plain diff
Merged Simon McVittie requested to merge wip/fix-compiler-warnings into master Jun 29, 2021
  • Overview 0
  • Commits 6
  • Pipelines 0
  • Changes 3

This MR does two things that could both be interpretations of "fix compiler warnings": it fixes the build system so that the intended compiler warnings actually take effect, and it fixes the code so that compiler warnings are silenced.

  • Fix error with -Werror=declaration-after-statement

    The build system was meant to enforce this, but due to a bug in Makefile-tests.am, the WARN_CFLAGS weren't used for anything.

  • build: Actually use the WARN_CFLAGS

  • main: Explicitly handle all members of enum in switch

    This means we can use -Wswitch-enum to check that we have thought about everything we need to handle.

  • Fix signedness warnings

  • build: Officially require GLib 2.50

    We call g_log_writer_is_journald() unconditionally since commit cd78f8f9 "Output messages by default if stdout is not the Journal" and nobody complained.

  • build: Make GLIB_VERSION_MIN_REQUIRED, etc. actually effective

    Previously they were appended to a write-only variable.

Assignee
Assign to
Reviewers
Request review from
Time tracking
Source branch: wip/fix-compiler-warnings