--- gdkdnd-x11.c	2004-04-26 02:23:30.000000000 +1000
+++ gdkdnd-x11-2.c	2004-04-26 02:23:18.000000000 +1000
@@ -910,6 +910,9 @@
       guchar *p;
       gboolean success = FALSE;
 
+      guchar **pheader;
+      gpointer temp_header;
+
       gdk_error_trap_push ();
       XGetWindowProperty (display_x11->xdisplay, 
 			  display_x11->motif_drag_window, 
@@ -917,7 +920,11 @@
 			  0, (sizeof(MotifTargetTableHeader)+3)/4, FALSE,
 			  motif_drag_targets_atom, 
 			  &type, &format, &nitems, &bytes_after,
-			  (guchar **)&header);
+			  pheader);
+      /* OK, this is such a hack! this is done to stop gcc from complaining about 
+         strict aliasing violations */
+      temp_header = (gpointer) &pheader;
+      header = (MotifTargetTableHeader*) &temp_header;
 
       if (gdk_error_trap_pop () || (format != 8) || (nitems < sizeof (MotifTargetTableHeader)))
 	goto error;
@@ -1262,12 +1269,20 @@
   unsigned long nitems, after;
   Atom motif_drag_receiver_info_atom = gdk_x11_get_xatom_by_name_for_display (display, "_MOTIF_DRAG_RECEIVER_INFO");
 
+  gpointer temp_info;
+  guchar **pinfo;
+
   gdk_error_trap_push ();
   XGetWindowProperty (GDK_DISPLAY_XDISPLAY (display), win, 
 		      motif_drag_receiver_info_atom, 
 		      0, (sizeof(*info)+3)/4, False, AnyPropertyType,
 		      &type, &format, &nitems, &after, 
-		      (guchar **)&info);
+		      pinfo);
+
+  /* OK, this is such a hack! this is done to stop gcc from complaining about
+     strict aliasing violations */
+  temp_info = (gpointer) &pinfo;
+  info = (MotifDragReceiverInfo*) &temp_info;
 
   if (gdk_error_trap_pop() == 0)
     {
@@ -1455,13 +1470,21 @@
   MotifDragInitiatorInfo *initiator_info;
   
   GdkDisplayX11 *display_x11 = GDK_DISPLAY_X11 (display);
+
+  guchar **pinitiator_info;
+  gpointer temp_initiator_info;
   
   gdk_error_trap_push ();
   XGetWindowProperty (GDK_DISPLAY_XDISPLAY (display), source_window, atom,
 		      0, sizeof(*initiator_info), FALSE,
 		      gdk_x11_get_xatom_by_name_for_display (display, "_MOTIF_DRAG_INITIATOR_INFO"),
 		      &type, &format, &nitems, &bytes_after,
-		      (guchar **)&initiator_info);
+		      pinitiator_info);
+  /* OK, this is such a hack! this is done to stop gcc from complaining about
+     strict aliasing violations */
+  temp_initiator_info = (gpointer) &pinitiator_info;
+  initiator_info = (MotifDragInitiatorInfo*) &temp_initiator_info;
+
 
   if (gdk_error_trap_pop () || (format != 8) || (nitems != sizeof (MotifDragInitiatorInfo)) || (bytes_after != 0))
     {
@@ -2367,8 +2390,8 @@
   Atom type = None;
   int format;
   unsigned long nitems, after;
-  Atom *version;
-  Window *proxy_data;
+  Atom *version=NULL;
+  Window *proxy_data=NULL;
   Window proxy;
   Atom xdnd_proxy_atom = gdk_x11_get_xatom_by_name_for_display (display, "XdndProxy");
   Atom xdnd_aware_atom = gdk_x11_get_xatom_by_name_for_display (display, "XdndAware");
@@ -2379,9 +2402,9 @@
   
   if (XGetWindowProperty (GDK_DISPLAY_XDISPLAY (display), win, 
 			  xdnd_proxy_atom, 0, 
-			  1, False, AnyPropertyType,
+			  1, FALSE, AnyPropertyType,
 			  &type, &format, &nitems, &after, 
-			  (guchar **)&proxy_data) == Success)
+			  (guchar **)proxy_data) == Success)
     {
       if (type != None)
 	{
@@ -2401,7 +2424,7 @@
 			       xdnd_aware_atom, 0, 
 			       1, False, AnyPropertyType,
 			       &type, &format, &nitems, &after, 
-			       (guchar **)&version) == Success) &&
+			       (guchar**)version) == Success) &&
 	  type != None)
 	{
 	  if ((format == 32) && (nitems == 1))
@@ -2431,10 +2454,10 @@
   Atom type;
   int format;
   gulong nitems, after;
-  Atom *data;
+  Atom *data=NULL;
 
   gint i;
-  
+
   PRIVATE_DATA (context)->xdnd_have_actions = FALSE;
 
   if (gdk_window_get_window_type (context->source_window) == GDK_WINDOW_FOREIGN)
@@ -2448,7 +2471,7 @@
 			      gdk_x11_get_xatom_by_name_for_display (display, "XdndActionList"),
 			      0, 65536,
 			      False, XA_ATOM, &type, &format, &nitems,
-			      &after, (guchar **)&data) == Success &&
+			      &after, (guchar **)data) == Success &&
 	  type == XA_ATOM)
 	{
 	  context->actions = 0;
@@ -2625,7 +2648,7 @@
   Atom type;
   int format;
   gulong nitems, after;
-  Atom *data;
+  Atom *data=NULL;
 
   guint32 source_window;
   gboolean get_types;
@@ -2689,7 +2712,7 @@
 			  gdk_x11_get_xatom_by_name_for_display (display, "XdndTypeList"),
 			  0, 65536,
 			  False, XA_ATOM, &type, &format, &nitems,
-			  &after, (guchar **)&data);
+			  &after, (guchar **)data);
 
       if (gdk_error_trap_pop () || (format != 32) || (type != XA_ATOM))
 	{
@@ -2699,7 +2722,7 @@
 
       for (i=0; i<nitems; i++)
 	new_context->targets = 
-	  g_list_append (new_context->targets,
+	  g_list_append ((GList*)new_context->targets,
 			 GDK_ATOM_TO_POINTER (gdk_x11_xatom_to_atom_for_display (display,
 										 data[i])));
 
