GNOME Bugzilla – Bug 141030
gtkwidget.c: gtk_widget_reparent_subwindows - warning about deferencing type-punned pointer breaking strict aliasing rules
Last modified: 2006-10-07 16:01:38 UTC
gtk_widget_reparent_subwindows fixed to prevent warning by gcc about it breaking strict aliasing rules. Happens because gdk_window_get_user_data is expecting parameter 2 to be a gpointer*, however it's getting a GtkWidget. Fixed by creating a gpointer variable pchild for use in gdk_window_get_user_data, then assign it's address to GtkWidget *child.
Created attachment 27053 [details] [review] Proposed patch
There's been a lot of discussion about these kinds of warnings and there's a general bugreport for them in bug #122777. Should this be closed as a duplicate of that one?
no feedback, closing as duplicate. *** This bug has been marked as a duplicate of 122777 ***