[glib] glib-compile-resources: avoid warnings with -Wmissing-field-initializers



commit 615b44c7ca77273b76b986edad16a56752c00bed
Author: Dan Winship <danw gnome org>
Date:   Wed Jan 9 10:06:53 2013 -0500

    glib-compile-resources: avoid warnings with -Wmissing-field-initializers
    
    Initialize all the fields of the generated GStaticResource, to avoid
    warnings in packages that build with -Wmissing-field-initializers.

 gio/glib-compile-resources.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
---
diff --git a/gio/glib-compile-resources.c b/gio/glib-compile-resources.c
index 195237f..6ec3076 100644
--- a/gio/glib-compile-resources.c
+++ b/gio/glib-compile-resources.c
@@ -878,7 +878,7 @@ main (int argc, char **argv)
 
       fprintf (file,
 	       "\n"
-	       "static GStaticResource static_resource = { %s_resource_data.data, sizeof (%s_resource_data.data) };\n"
+	       "static GStaticResource static_resource = { %s_resource_data.data, sizeof (%s_resource_data.data), NULL, NULL, NULL };\n"
 	       "%s GResource *%s_get_resource (void);\n"
 	       "GResource *%s_get_resource (void)\n"
 	       "{\n"



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