--- gtkmain.c	2004-04-25 03:49:13.000000000 +1000
+++ gtkmain2.c	2004-04-25 03:49:04.000000000 +1000
@@ -526,37 +526,41 @@
 
 static GSList *
 load_module (GSList      *module_list,
-	     const gchar *name)
+             const gchar *name)
 {
   GtkModuleInitFunc modinit_func = NULL;
   GtkModuleInfo *info;
   GModule *module = NULL;
-
+                                                                                                                                             
+  gpointer pmodinit_func;
+                                                                                                                                             
   if (g_module_supported ())
     {
       module = find_module (name);
       if (module &&
-	  g_module_symbol (module, "gtk_module_init", (gpointer *) &modinit_func) &&
-	  modinit_func)
-	{
-	  if (!g_slist_find (module_list, (gconstpointer) modinit_func))
-	    {
-	      g_module_make_resident (module);
-	      info = g_new (GtkModuleInfo, 1);
-
-	      info->init_func = modinit_func;
-	      g_module_symbol (module, "gtk_module_display_init",
-			       (gpointer *) &info->display_init_func);
-	      
-	      module_list = g_slist_prepend (module_list, info);
-	    }
-	  else
-	    {
-	      g_module_close (module);
-	      module = NULL;
-	    }
-	}
+          g_module_symbol (module, "gtk_module_init", &pmodinit_func) &&
+          modinit_func)
+        {
+          modinit_func = pmodinit_func;
+          if (!g_slist_find (module_list, (gconstpointer) modinit_func))
+            {
+              g_module_make_resident (module);
+              info = g_new (GtkModuleInfo, 1);
+                                                                                                                                             
+              info->init_func = modinit_func;
+              g_module_symbol (module, "gtk_module_display_init",
+                               (gpointer *) &info->display_init_func);
+                                                                                                                                             
+              module_list = g_slist_prepend (module_list, info);
+            }
+          else
+            {
+              g_module_close (module);
+              module = NULL;
+            }
+        }
     }
+
   if (!modinit_func)
     {
       g_message ("Failed to load module \"%s\": %s",
@@ -1352,6 +1356,8 @@
   gboolean owner_events;
   GdkDisplay *display;
 
+  gpointer pgrab_widget;
+
   switch (event->type)
     {
     case GDK_SCROLL:
@@ -1380,8 +1386,10 @@
       return NULL;
     }
 
+  pgrab_widget = &grab_widget;
+
   event_widget = gtk_get_event_widget (event);
-  gdk_window_get_user_data (grab_window, (void**) &grab_widget);
+  gdk_window_get_user_data (grab_window, &pgrab_widget);
 
   if (grab_widget &&
       gtk_main_get_window_group (grab_widget) != gtk_main_get_window_group (event_widget))
@@ -2225,12 +2233,15 @@
 GtkWidget*
 gtk_get_event_widget (GdkEvent *event)
 {
-  GtkWidget *widget;
-
-  widget = NULL;
+  GtkWidget *widget=NULL;
+  gpointer pwidget;
+                                                                                                                                             
   if (event && event->any.window)
-    gdk_window_get_user_data (event->any.window, (void**) &widget);
-  
+  {
+    pwidget = &widget;
+    gdk_window_get_user_data (event->any.window, &pwidget);
+  }
+                                                                                                                                             
   return widget;
 }
 
