diff options
author | Philip Chimento <philip.chimento@gmail.com> | 2019-04-15 21:29:23 -0700 |
---|---|---|
committer | Philip Chimento <philip.chimento@gmail.com> | 2019-04-15 23:49:44 -0700 |
commit | 8ebedcd275db8761d70f4889c9f873d4ffee42ca (patch) | |
tree | c3615255ff6102039bb7c7e00273e152a2dfaddc /tests | |
parent | 962ea1afed874c95e39d031399dd0b8a6d910d7c (diff) | |
download | gobject-introspection-8ebedcd275db8761d70f4889c9f873d4ffee42ca.tar.gz |
regress: Initialize all struct fields, or mark intent not to
In some cases we don't initialize all the struct fields of Regress
structs. We should either initialize them all, in the case of fields
that were added later; or mark that we don't intend to initialize them
all, by using C99 designated initializers.
Diffstat (limited to 'tests')
-rw-r--r-- | tests/scanner/regress.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/tests/scanner/regress.c b/tests/scanner/regress.c index 728c7e81..13df9e29 100644 --- a/tests/scanner/regress.c +++ b/tests/scanner/regress.c @@ -1827,7 +1827,7 @@ const RegressTestSimpleBoxedA* regress_test_simple_boxed_a_const_return (void) { static RegressTestSimpleBoxedA simple_a = { - 5, 6, 7.0 + 5, 6, 7.0, REGRESS_TEST_VALUE1 }; return &simple_a; @@ -4514,9 +4514,9 @@ void regress_test_array_struct_out_none (RegressTestStructA **arr, gsize *len) { static RegressTestStructA array[3] = { - {111}, - {222}, - {333}, + {.some_int = 111}, + {.some_int = 222}, + {.some_int = 333}, }; *arr = array; |