[gobject-introspection] regress: Initialize all struct fields, or mark intent not to



commit 8ebedcd275db8761d70f4889c9f873d4ffee42ca
Author: Philip Chimento <philip chimento gmail com>
Date:   Mon Apr 15 21:29:23 2019 -0700

    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.

 tests/scanner/regress.c | 8 ++++----
 1 file 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;


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]