Commit 8ebedcd2 authored by Philip Chimento's avatar Philip Chimento 🚮

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.
parent 962ea1af
......@@ -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;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment