[glib: 3/7] Fix missing initializer warning in gobject/gtypeplugin.c:g_type_plugin_get_type()




commit 12ec1eb062fcf3dd1abed39086995ca8a1a09ff0
Author: Emmanuel Fleury <emmanuel fleury gmail com>
Date:   Mon Nov 16 16:55:46 2020 +0100

    Fix missing initializer warning in gobject/gtypeplugin.c:g_type_plugin_get_type()
    
    gobject/gtypeplugin.c: In function ‘g_type_plugin_get_type’:
    gobject/gtypeplugin.c:91:7: error: missing initializer for field ‘class_init’ of ‘GTypeInfo’ {aka ‘const 
struct _GTypeInfo’}
       91 |       };
          |       ^
    In file included from gobject/gtypeplugin.h:24,
                     from gobject/gtypeplugin.c:20:
    gobject/gtype.h:1053:26: note: ‘class_init’ declared here
     1053 |   GClassInitFunc         class_init;
          |                          ^~~~~~~~~~

 gobject/gtypeplugin.c | 13 ++++++++++---
 1 file changed, 10 insertions(+), 3 deletions(-)
---
diff --git a/gobject/gtypeplugin.c b/gobject/gtypeplugin.c
index d5007f1d3..eba85151d 100644
--- a/gobject/gtypeplugin.c
+++ b/gobject/gtypeplugin.c
@@ -85,9 +85,16 @@ g_type_plugin_get_type (void)
   if (!type_plugin_type)
     {
       const GTypeInfo type_plugin_info = {
-       sizeof (GTypePluginClass),
-       NULL,           /* base_init */
-       NULL,           /* base_finalize */
+        sizeof (GTypePluginClass),
+        NULL,           /* base_init */
+        NULL,           /* base_finalize */
+        0,              /* class_init */
+        NULL,           /* class_destroy */
+        NULL,           /* class_data */
+        0,              /* instance_size */
+        0,              /* n_preallocs */
+        NULL,           /* instance_init */
+        NULL,           /* value_table */
       };
       
       type_plugin_type = g_type_register_static (G_TYPE_INTERFACE, g_intern_static_string ("GTypePlugin"), 
&type_plugin_info, 0);


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