From: Andy Spencer Date: Mon, 10 Aug 2009 00:14:32 +0000 (+0000) Subject: gcc 4.1 warning fix, thanks to Auchter X-Git-Tag: gis-v0.1~9 X-Git-Url: http://pileus.org/git/?p=aweather;a=commitdiff_plain;h=372f8b7c6c2f487508fd345a83b92c709c94baa1 gcc 4.1 warning fix, thanks to Auchter --- diff --git a/src/gis/gis-plugin.c b/src/gis/gis-plugin.c index 6888b48..e3d132b 100644 --- a/src/gis/gis-plugin.c +++ b/src/gis/gis-plugin.c @@ -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);