[glib] Fix build of gio/gapplication.c on Visual C++



commit 4825e819b2ca59409b93f4d6f0f742d630626887
Author: Chun-wei Fan <fanchunwei src gnome org>
Date:   Thu Feb 20 08:47:54 2014 +0800

    Fix build of gio/gapplication.c on Visual C++
    
    Visual C++ is quite zealous about checking against the types used in the
    initializing of array of structures, even up to Visual C++ 2013.  Fix this
    by splitting up the initializing steps.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=724609

 gio/gapplication.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)
---
diff --git a/gio/gapplication.c b/gio/gapplication.c
index ecbeb8d..472c3a5 100644
--- a/gio/gapplication.c
+++ b/gio/gapplication.c
@@ -652,7 +652,8 @@ g_application_add_main_option_entries (GApplication       *application,
 
   for (i = 0; entries[i].long_name; i++)
     {
-      GOptionEntry my_entries[2] = { entries[i], { NULL } };
+      GOptionEntry my_entries[2] = { { NULL }, { NULL } };
+      my_entries[0] = entries[i];
 
       if (!my_entries[0].arg_data)
         add_packed_option (application, &my_entries[0]);


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