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,
      | ^~~~~~~~~~~~
This commit is contained in:
Emmanuel Fleury 2020-11-20 21:17:03 +01:00
parent 76af9efbff
commit 277d206d38

View File

@ -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, \