[glib: 4/8] Fix missing initializer warning in gobject/tests/ifaceproperties.c:test_iface_get_type()




commit ff5d09af5ed20c8a22ea018c32189080e62509d7
Author: Emmanuel Fleury <emmanuel fleury gmail com>
Date:   Mon Nov 16 19:31:52 2020 +0100

    Fix missing initializer warning in gobject/tests/ifaceproperties.c:test_iface_get_type()
    
    gobject/tests/ifaceproperties.c: In function ‘test_iface_get_type’:
    gobject/tests/ifaceproperties.c:144:1: error: missing initializer for field ‘class_finalize’ of 
‘GTypeInfo’ {aka ‘const struct _GTypeInfo’}
      144 | static DEFINE_IFACE (TestIface, test_iface, NULL, test_iface_default_init)
          | ^~~~~~
    In file included from gobject/gobject.h:24,
                     from gobject/gbinding.h:29,
                     from glib/glib-object.h:22,
                     from gobject/tests/ifaceproperties.c:21:
    gobject/gtype.h:1054:26: note: ‘class_finalize’ declared here
     1054 |   GClassFinalizeFunc     class_finalize;
          |                          ^~~~~~~~~~~~~~

 gobject/tests/testcommon.h | 6 ++++++
 1 file changed, 6 insertions(+)
---
diff --git a/gobject/tests/testcommon.h b/gobject/tests/testcommon.h
index 157fe65cc..0fdaea892 100644
--- a/gobject/tests/testcommon.h
+++ b/gobject/tests/testcommon.h
@@ -72,6 +72,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]