From 43e79f443469c55ef4d3a43ce1e455d6eafcd26c Mon Sep 17 00:00:00 2001 From: Lulu Date: Sun, 6 Oct 2024 22:10:40 +0200 Subject: Fix gcc warning -Wmissing-field-initializers The approach that was taken here was to add default values to the type definitions rather than specify them whenever they are missing. Now the only remaining warning is '-Wunused-parameter' which @jade said is usually counterproductive and that we can just disable it: https://git.lix.systems/lix-project/lix/issues/456#issuecomment-6617 So this change adds the flags '-Wall', '-Wextra' and '-Wno-unused-parameter', so that all warnings are enabled except for '-Wunused-parameter'. Change-Id: Ic223a964d67ab429e8da804c0721ba5e25d53012 --- src/libstore/build/goal.hh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/libstore/build/goal.hh') diff --git a/src/libstore/build/goal.hh b/src/libstore/build/goal.hh index de1c92c85..29540dcd3 100644 --- a/src/libstore/build/goal.hh +++ b/src/libstore/build/goal.hh @@ -88,8 +88,8 @@ protected: public: struct [[nodiscard]] WorkResult { ExitCode exitCode; - BuildResult result; - std::shared_ptr ex; + BuildResult result = {}; + std::shared_ptr ex = {}; bool permanentFailure = false; bool timedOut = false; bool hashMismatch = false; -- cgit v1.2.3