[glib: 4/9] Fix several missing initializer warnings in gio/glib-compile-schemas.c




commit 6b3e39fafdf36dc530498af40d65971e4c596446
Author: Emmanuel Fleury <emmanuel fleury gmail com>
Date:   Tue Nov 17 22:18:16 2020 +0100

    Fix several missing initializer warnings in gio/glib-compile-schemas.c
    
    gio/glib-compile-schemas.c: In function ‘parse_gschema_files’:
    gio/glib-compile-schemas.c:1773:3: error: missing initializer for field ‘passthrough’ of ‘GMarkupParser’ 
{aka ‘struct _GMarkupParser’}
     1773 |   GMarkupParser parser = { start_element, end_element, text };
          |   ^~~~~~~~~~~~~
    gio/glib-compile-schemas.c: In function ‘main’:
    gio/glib-compile-schemas.c:2176:5: error: missing initializer for field ‘arg_description’ of 
‘GOptionEntry’ {aka ‘struct _GOptionEntry’}
     2176 |     { "allow-any-name", 0, 0, G_OPTION_ARG_NONE, &allow_any_name, N_("Do not enforce key name 
restrictions") },
          |     ^

 gio/glib-compile-schemas.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/gio/glib-compile-schemas.c b/gio/glib-compile-schemas.c
index 84b82baa9..cfea042f8 100644
--- a/gio/glib-compile-schemas.c
+++ b/gio/glib-compile-schemas.c
@@ -1770,7 +1770,7 @@ static GHashTable *
 parse_gschema_files (gchar    **files,
                      gboolean   strict)
 {
-  GMarkupParser parser = { start_element, end_element, text };
+  GMarkupParser parser = { start_element, end_element, text, NULL, NULL };
   ParseState state = { 0, };
   const gchar *filename;
   GError *error = NULL;
@@ -2173,7 +2173,7 @@ main (int argc, char **argv)
     { "targetdir", 0, 0, G_OPTION_ARG_FILENAME, &targetdir, N_("Where to store the gschemas.compiled file"), 
N_("DIRECTORY") },
     { "strict", 0, 0, G_OPTION_ARG_NONE, &strict, N_("Abort on any errors in schemas"), NULL },
     { "dry-run", 0, 0, G_OPTION_ARG_NONE, &dry_run, N_("Do not write the gschema.compiled file"), NULL },
-    { "allow-any-name", 0, 0, G_OPTION_ARG_NONE, &allow_any_name, N_("Do not enforce key name restrictions") 
},
+    { "allow-any-name", 0, 0, G_OPTION_ARG_NONE, &allow_any_name, N_("Do not enforce key name 
restrictions"), NULL },
 
     /* These options are only for use in the gschema-compile tests */
     { "schema-file", 0, G_OPTION_FLAG_HIDDEN, G_OPTION_ARG_FILENAME_ARRAY, &schema_files, NULL, NULL },


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