]> Pileus Git - grits/commitdiff
gcc 4.1 warning fix, thanks to Auchter
authorAndy Spencer <andy753421@gmail.com>
Mon, 10 Aug 2009 00:14:32 +0000 (00:14 +0000)
committerAndy Spencer <andy753421@gmail.com>
Mon, 10 Aug 2009 00:14:32 +0000 (00:14 +0000)
src/gis/gis-plugin.c

index 6888b484d8dba073cd1cb2fd8577cab6843ccf44..e3d132b0156caee72f29987488d0e2f2a93ed675 100644 (file)
@@ -107,9 +107,9 @@ GisPlugin *gis_plugins_load(GisPlugins *self, const char *name,
                return NULL;
        }
 
-       GisPluginConstructor constructor;
+       gpointer constructor_ptr; // GCC 4.1 fix?
        gchar *constructor_str = g_strconcat("gis_plugin_", name, "_new", NULL);
-       if (!g_module_symbol(module, constructor_str, (gpointer*)&constructor)) {
+       if (!g_module_symbol(module, constructor_str, &constructor_ptr)) {
                g_warning("Unable to load symbol %s from %s: %s",
                                constructor_str, name, g_module_error());
                g_module_close(module);
@@ -117,6 +117,7 @@ GisPlugin *gis_plugins_load(GisPlugins *self, const char *name,
                return NULL;
        }
        g_free(constructor_str);
+       GisPluginConstructor constructor = constructor_ptr;
 
        GisPluginStore *store = g_malloc(sizeof(GisPluginStore));
        store->name = g_strdup(name);