diff options
author | Federico Mena Quintero <federico@novell.com> | 2008-07-18 18:27:30 +0000 |
---|---|---|
committer | Federico Mena Quintero <federico@src.gnome.org> | 2008-07-18 18:27:30 +0000 |
commit | 0278fdcbc21f7af34403c7c025cad7e18c484e94 (patch) | |
tree | 225cf90d6729e1f1d387f9ebdfcbcd44ee00c4c9 /gtk/gtkmodules.c | |
parent | cf68d46c646f807d3ec926af20915ac57c66c8d7 (diff) | |
download | gtk+-0278fdcbc21f7af34403c7c025cad7e18c484e94.tar.gz |
Don't do funny casts to avoid compiler warnings
2008-07-18 Federico Mena Quintero <federico@novell.com>
* demos/gtk-demo/changedisplay.c (find_toplevel_at_pointer): Don't
do funny casts to avoid compiler warnings.
* demos/gtk-demo/textview.c (easter_egg_callback): Likewise.
* gtk/gtkmain.c (rewrite_event_for_grabs, gtk_get_event_widget): Likewise.
* gtk/gtkmodules.c (load_module): Likewise.
* gtk/gtkselection.c (gtk_selection_convert): Likewise.
* gtk/gtktipsquery.c (gtk_tips_query_event): Likewise.
* gtk/queryimmodules.c (query_module): Likewise.
* tests/testgtk.c (create_gridded_geometry, create_key_lookup)
(find_widget_at_pointer): Likewise.
Signed-off-by: Federico Mena Quintero <federico@novell.com>
svn path=/trunk/; revision=20862
Diffstat (limited to 'gtk/gtkmodules.c')
-rw-r--r-- | gtk/gtkmodules.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/gtk/gtkmodules.c b/gtk/gtkmodules.c index 526a5b8c3a..0cac9634f4 100644 --- a/gtk/gtkmodules.c +++ b/gtk/gtkmodules.c @@ -254,6 +254,7 @@ load_module (GSList *module_list, const gchar *name) { GtkModuleInitFunc modinit_func; + gpointer modinit_func_ptr; GtkModuleInfo *info = NULL; GModule *module = NULL; GSList *l; @@ -279,8 +280,12 @@ load_module (GSList *module_list, if (module) { - if (!g_module_symbol (module, "gtk_module_init", (gpointer *) &modinit_func) || - !modinit_func) + if (g_module_symbol (module, "gtk_module_init", &modinit_func_ptr)) + modinit_func = modinit_func_ptr; + else + modinit_func = NULL; + + if (!modinit_func) g_module_close (module); else { |