Skip to content

Commit

Permalink
Add missing group field for cli argp_options
Browse files Browse the repository at this point in the history
Rebuilding, we get the following error:

```
missing initializer for field 'group' of 'const struct argp_option'
[-Werror=missing-field-initializers]
```

argp_option (from argp.h) has one more field 'group', denoting the cli
option grouping when displaying groups of options to users.  Adding
group ids to avoid the compilation warning/error.
  • Loading branch information
jonsmock committed May 13, 2024
1 parent 6821d1e commit c1d7d74
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions linkevents.c
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,8 @@ const char argp_program_doc[] =
" linkevents -v\n";

static const struct argp_option opts[] = {
{ "verbose", 'v', NULL, 0, "Verbose debug output" },
{ NULL, 'h', NULL, OPTION_HIDDEN, "Show the full help" },
{ "verbose", 'v', NULL, 0, "Verbose debug output", 0 },
{ NULL, 'h', NULL, OPTION_HIDDEN, "Show the full help", -1 },
{},
};

Expand Down

0 comments on commit c1d7d74

Please sign in to comment.