GNOME Bugzilla – Bug 141024
gtkselection.c: gtk_selection_convert - warning about deferencing type-punned pointer breaking strict aliasing rules
Last modified: 2013-08-14 02:34:19 UTC
gtk_selection_convert fixed to prevent warning by gcc about it breaking strict aliasing rules. Happens because gdk_window_get_user_data is expecting parameter 2 of function to be a gpointer*, however it's getting a GtkWidget. Fixed by creating a gpointer variable powner_widget for use in gdk_window_get_user_data, then assign it's address to GtkWidget *owner_widget.
Created attachment 27046 [details] [review] Proposed patch
Created attachment 27048 [details] [review] Proposed patch.... Er, oops. I accidently uploaded the wrong file!
+ gdk_window_get_user_data (owner_window, (gpointer *)&powner_widget); ^^^^^^^^^^^ not needed + + owner_widget = (GtkWidget*)&powner_widget; ^ highly harmful
Er... ok... back to the drawing board then :) Close? If it's a bad patch or not needed it might be for the best.
Is this still an issue?