After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 141030 - gtkwidget.c: gtk_widget_reparent_subwindows - warning about deferencing type-punned pointer breaking strict aliasing rules
gtkwidget.c: gtk_widget_reparent_subwindows - warning about deferencing type-...
Status: RESOLVED DUPLICATE of bug 122777
Product: gtk+
Classification: Platform
Component: Widget: Other
2.4.x
Other Linux
: Normal normal
: Small fix
Assigned To: gtk-bugs
gtk-bugs
Depends on:
Blocks:
 
 
Reported: 2004-04-24 19:21 UTC by Chris Sherlock
Modified: 2006-10-07 16:01 UTC
See Also:
GNOME target: ---
GNOME version: 2.9/2.10


Attachments
Proposed patch (439 bytes, patch)
2004-04-24 19:22 UTC, Chris Sherlock
none Details | Review

Description Chris Sherlock 2004-04-24 19:21:20 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.
Comment 1 Chris Sherlock 2004-04-24 19:22:24 UTC
Created attachment 27053 [details] [review]
Proposed patch
Comment 2 Kjartan Maraas 2005-01-07 13:23:45 UTC
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?
Comment 3 André Klapper 2006-10-07 16:01:38 UTC
no feedback, closing as duplicate.

*** This bug has been marked as a duplicate of 122777 ***