[gedit/gnome-3-12] Tentative fix for win32 build warning



commit 8021e36df766e307c412d596417d500477f3d299
Author: Paolo Borelli <pborelli gnome org>
Date:   Tue Jul 22 10:00:58 2014 +0200

    Tentative fix for win32 build warning

 gedit/gedit.c |   18 +++++++++---------
 1 files changed, 9 insertions(+), 9 deletions(-)
---
diff --git a/gedit/gedit.c b/gedit/gedit.c
index 8561e13..102c2d3 100644
--- a/gedit/gedit.c
+++ b/gedit/gedit.c
@@ -41,7 +41,7 @@ static GModule *libgedit_dll = NULL;
  * point is to find and load libgedit.dll.
  */
 static void
-gedit_w32_load_private_dll (GType *type)
+gedit_w32_load_private_dll (void)
 {
        gchar *dllpath;
        gchar *prefix;
@@ -69,13 +69,7 @@ gedit_w32_load_private_dll (GType *type)
                libgedit_dll = g_module_open ("libgedit.dll", 0);
        }
 
-       if (libgedit_dll != NULL)
-       {
-               /* Now that we did everything we could to make the DLL available, we can
-                * implicitly call the *_get_type() function from it.
-                */
-               *type = GEDIT_TYPE_APP_WIN32;
-       }
+       return (libgedit_dll != NULL)
 }
 
 static void
@@ -100,7 +94,13 @@ main (int argc, char *argv[])
        type = GEDIT_TYPE_APP_OSX;
 #else
 #ifdef G_OS_WIN32
-       gedit_w32_load_private_dll (&type);
+       if (!gedit_w32_load_private_dll ())
+       {
+               g_printerr ("Failed to load libgedit DLL\n")
+               return 1;
+       }
+
+       type = GEDIT_TYPE_APP_WIN32;
 #else
        type = GEDIT_TYPE_APP_X11;
 #endif


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