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
This commit is contained in:
Lulu
2024-10-08 01:44:38 +00:00
parent 299813f324
commit 43e79f4434
11 changed files with 22 additions and 23 deletions
+1 -1
View File
@@ -9,7 +9,7 @@ namespace nix::parser {
struct StringToken
{
std::string_view s;
bool hasIndentation;
bool hasIndentation = false;
operator std::string_view() const { return s; }
};