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.