Skip to content

Commit

Permalink
Avoid g++ warnings from last-element initialisers in recently-added code
Browse files Browse the repository at this point in the history
gcc was happy with this, but g++ complained

```
  builtin.c:511:1: warning: missing initializer for member ‘BuiltinFuncDescriptor::xsub’ [-Wmissing-field-initializers]
    511 | };
        | ^
```
  • Loading branch information
leonerd committed Jul 28, 2023
1 parent 942fa8d commit 0815e54
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
3 changes: 2 additions & 1 deletion builtin.c
Original file line number Diff line number Diff line change
Expand Up @@ -507,7 +507,8 @@ static const struct BuiltinFuncDescriptor builtins[] = {
/* list functions */
{ "builtin::indexed", &XS_builtin_indexed, &ck_builtin_funcN, 0 },
{ "builtin::export_lexically", &XS_builtin_export_lexically, NULL, 0 },
{ 0 }

{}
};

XS(XS_builtin_import);
Expand Down
4 changes: 2 additions & 2 deletions class.c
Original file line number Diff line number Diff line change
Expand Up @@ -570,7 +570,7 @@ static struct {
.requires_value = true,
.apply = &apply_class_attribute_isa,
},
{0}
{}
};

static void
Expand Down Expand Up @@ -955,7 +955,7 @@ static struct {
.requires_value = false,
.apply = &apply_field_attribute_param,
},
{0}
{}
};

static void
Expand Down

0 comments on commit 0815e54

Please sign in to comment.