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 141069 - Bug 141068: demos/gtk-demo/textview.c: easter_egg_callback - warning: dereferencing type-punned pointer will break strict-aliasing rules
Bug 141068: demos/gtk-demo/textview.c: easter_egg_callback - warning: derefer...
Status: RESOLVED INCOMPLETE
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-25 13:28 UTC by Chris Sherlock
Modified: 2010-12-17 06:01 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Proposed patch (589 bytes, patch)
2004-04-25 13:28 UTC, Chris Sherlock
rejected Details | Review

Description Chris Sherlock 2004-04-25 13:28:10 UTC
easter_egg_callback fixed to prevent warning by gcc about it breaking strict
aliasing rules. Happens because g_object_add_weak_pointer is expecting parameter
2 to be a gpointer*, however it's getting a GtkWidget.

Fixed by creating a gpointer variable pwindow for use in
gdk_window_get_user_data, then assign it's address to GtkWidget *window.
Comment 1 Chris Sherlock 2004-04-25 13:28:54 UTC
Created attachment 27071 [details] [review]
Proposed patch
Comment 2 Owen Taylor 2004-11-27 16:03:46 UTC
Comment on attachment 27071 [details] [review]
Proposed patch

You might want to look
at the g_object_add_weak_pointer
docs - that's not an out parameter, that's the location to clear when the
object is destroyed.
Comment 3 Javier Jardón (IRC: jjardon) 2010-10-29 16:25:30 UTC
Thank you for taking the time to report this bug and helping to make GTK+ better.

We are sorry that we do not always have the capacity to look at all reported bugs in a timely manner. There have been many changes in GTK+ since that time you reported the bug and your problem may have been fixed with some of the updates.

It would help us a lot if you could test a current, supported, GTK+ version (2.22 or, even better, current master). If you can test it, and it is still an issue, we would appreciate if you could upload any log / test case that are relevant for this particular issue.
Comment 4 Fabio Durán Verdugo 2010-12-17 06:01:48 UTC
Closing this bug report as no further information has been provided. Please feel free to reopen this bug if you can provide the information asked for.
Thanks!