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 141020 - gtkmain.c: multiple warnings about deferencing type-punned pointer breaks strict aliasing rules
gtkmain.c: multiple warnings about deferencing type-punned pointer breaks str...
Status: RESOLVED OBSOLETE
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 18:02 UTC by Chris Sherlock
Modified: 2008-03-27 22:07 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Proposed patch for gtkmain.c (3.55 KB, patch)
2004-04-24 18:03 UTC, Chris Sherlock
none Details | Review

Description Chris Sherlock 2004-04-24 18:02:40 UTC
gtkmain.c functions that generate this warning:

load_module - happens because g_module_symbol is not passed a gpointer address.
Dealt with this by creating a new gpointer variable pmodinit_func, then copied
the address of the function pointer modinit_func into it. pmodinit_func is then
passed to g_module_symbol.

rewrite_event_for_grabs - gdk_window_get_user_data expects 2nd parameter to be a
gpointer*, instead is getting a GtkWidget*. Did much the same thing as with
load_module fix.

gtk_get_event_widget - same reason as for rewrite_event_for_grabs, it calls
gdk_window_get_user_data and passes it a GtkWidget* as second parameter. Same fix.
Comment 1 Chris Sherlock 2004-04-24 18:03:42 UTC
Created attachment 27043 [details] [review]
Proposed patch for gtkmain.c
Comment 2 Christian Kirbach 2006-06-04 13:36:33 UTC
is this still relevant for the latest gtk+?
Comment 3 André Klapper 2006-10-07 16:00:43 UTC
chris, can you please answer christian's question? thanks in advance!
Comment 4 Björn Lindqvist 2008-03-27 22:07:27 UTC
Resolving as obsolete, patch doesn't apply anymore and the relevant code has disappeared from gtkmain.c since the patch was written.