From 8dc95a5c584d8fdb99afec102702bd8801b95266 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jean-Fran=C3=A7ois=20Rameau?= Date: Thu, 2 Mar 2006 21:23:34 +0000 Subject: Fix gcc 4.1 warnings (dereferencing type-punned pointer will break MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 2006-03-02 Jean-François Rameau * embed/ephy-embed-shell.c:(ephy_embed_shell_dispose): * src/ephy-encoding-menu.c: (ephy_encoding_menu_view_dialog_cb): * src/ephy-history-window.c: (cmd_clear), (ephy_history_window_finalize): * src/ephy-shell.c: (ephy_shell_get_pdm_dialog),(ephy_shell_get_prefs_dialog), (ephy_shell_get_print_setup_dialog): * src/prefs-dialog.c: (prefs_dialog_finalize), (font_prefs_button_clicked_cb), (language_editor_add_button_clicked_cb): * src/bookmarks/ephy-bookmarks-editor.c: (ephy_bookmarks_editor_finalize): Fix gcc 4.1 warnings (dereferencing type-punned pointer will break strict-aliasing rules). --- src/bookmarks/ephy-bookmarks-editor.c | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) (limited to 'src/bookmarks') diff --git a/src/bookmarks/ephy-bookmarks-editor.c b/src/bookmarks/ephy-bookmarks-editor.c index badf962b8..6f5778105 100644 --- a/src/bookmarks/ephy-bookmarks-editor.c +++ b/src/bookmarks/ephy-bookmarks-editor.c @@ -1250,9 +1250,10 @@ ephy_bookmarks_editor_finalize (GObject *object) if (editor->priv->window) { + GtkWidget **window = &editor->priv->window; g_object_remove_weak_pointer (G_OBJECT(editor->priv->window), - (gpointer *)&editor->priv->window); + (gpointer *)window); } G_OBJECT_CLASS (parent_class)->finalize (object); @@ -1939,18 +1940,21 @@ void ephy_bookmarks_editor_set_parent (EphyBookmarksEditor *ebe, GtkWidget *window) { + GtkWidget **w; if (ebe->priv->window) { + w = &ebe->priv->window; g_object_remove_weak_pointer (G_OBJECT(ebe->priv->window), - (gpointer *)&ebe->priv->window); + (gpointer *)w); } ebe->priv->window = window; + w = &ebe->priv->window; g_object_add_weak_pointer (G_OBJECT(ebe->priv->window), - (gpointer *)&ebe->priv->window); + (gpointer *)w); } -- cgit v1.2.3