Skip to content
Please note that GitHub no longer supports your web browser.

We recommend upgrading to the latest Google Chrome or Firefox.

Learn more
Permalink
Browse files

parser: no struct fields warnings in C struct initializations

  • Loading branch information
medvednikov committed Jan 25, 2020
1 parent 71b50ae commit 222fc4b04f295dce10fb84d15309a1ea38ea6092
Showing with 1 addition and 1 deletion.
  1. +1 −1 vlib/compiler/struct.v
@@ -422,7 +422,7 @@ fn (p mut Parser) struct_init(typ_ string) string {
continue
}
field_typ := field.typ
if !p.builtin_mod && field_typ.ends_with('*') && p.mod != 'os' &&
if !p.builtin_mod && field_typ.ends_with('*') && !p.is_c_struct_init && p.mod != 'os' &&
p.mod != 'ui' {
p.warn('reference field `${typ}.${field.name}` must be initialized')
}

0 comments on commit 222fc4b

Please sign in to comment.
You can’t perform that action at this time.