[glib: 6/9] Fix multiple missing initializer warnings in tests/gobject/testcommon.h




commit 277d206d3812b913efbdf364403b776a15013d2b
Author: Emmanuel Fleury <emmanuel fleury gmail com>
Date:   Fri Nov 20 21:17:03 2020 +0100

    Fix multiple missing initializer warnings in tests/gobject/testcommon.h
    
    tests/gobject/testmodule.c: In function ‘test_module_get_type’:
    tests/gobject/testmodule.c:34:1: error: missing initializer for field ‘value_table’ of ‘GTypeInfo’ {aka 
‘const struct _GTypeInfo’}
       34 | DEFINE_TYPE (TestModule, test_module,
          | ^~~~~~~~~~~
    
    tests/gobject/defaultiface.c: In function ‘test_static_iface_get_type’:
    tests/gobject/defaultiface.c:58:1: error: missing initializer for field ‘class_finalize’ of ‘GTypeInfo’ 
{aka ‘const struct _GTypeInfo’}
       58 | DEFINE_IFACE (TestStaticIface, test_static_iface,
          | ^~~~~~~~~~~~

 tests/gobject/testcommon.h | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)
---
diff --git a/tests/gobject/testcommon.h b/tests/gobject/testcommon.h
index a5b59b3d3..3e40cca67 100644
--- a/tests/gobject/testcommon.h
+++ b/tests/gobject/testcommon.h
@@ -40,7 +40,8 @@ prefix ## _get_type (void)                                    \
          NULL,           /* class_data */                      \
          sizeof (name),                                        \
          0,             /* n_prelocs */                        \
-         (GInstanceInitFunc) instance_init                     \
+         (GInstanceInitFunc) instance_init,                    \
+          (const GTypeValueTable *) NULL,                      \
        };                                                      \
                                                                \
       object_type = g_type_register_static (parent_type,       \
@@ -72,6 +73,12 @@ prefix ## _get_type (void)                                   \
        (GBaseInitFunc) base_init,                              \
        (GBaseFinalizeFunc) NULL,                               \
        (GClassInitFunc) dflt_init,                             \
+        (GClassFinalizeFunc) NULL,                              \
+        (gconstpointer) NULL,                                   \
+        (guint16) 0,                                            \
+        (guint16) 0,                                            \
+        (GInstanceInitFunc) NULL,                               \
+        (const GTypeValueTable*) NULL,                          \
       };                                                       \
                                                                \
       iface_type = g_type_register_static (G_TYPE_INTERFACE,   \


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