summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPhilip Chimento <philip.chimento@gmail.com>2019-04-15 21:29:23 -0700
committerPhilip Chimento <philip.chimento@gmail.com>2019-04-15 23:49:44 -0700
commit8ebedcd275db8761d70f4889c9f873d4ffee42ca (patch)
treec3615255ff6102039bb7c7e00273e152a2dfaddc
parent962ea1afed874c95e39d031399dd0b8a6d910d7c (diff)
downloadgobject-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.
-rw-r--r--tests/scanner/regress.c8
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;