From ec96881f6e30e029c308eefe982a30da6fdca779 Mon Sep 17 00:00:00 2001 From: Diego Escalante Urrelo Date: Wed, 15 Aug 2007 07:46:04 +0000 Subject: Fix strict-aliasing warnings, patch by Cosimo Cecchi. Happy 10 years 2007-08-15 Diego Escalante Urrelo * embed/mozilla/EphyUtils.cpp: * embed/mozilla/EphyHeaderSniffer.cpp: * embed/mozilla/MozDownload.cpp: Fix strict-aliasing warnings, patch by Cosimo Cecchi. Happy 10 years GNOME!. Fixes bug #433173. svn path=/trunk/; revision=7274 --- embed/mozilla/EphyHeaderSniffer.cpp | 6 ++++-- embed/mozilla/EphyUtils.cpp | 3 ++- embed/mozilla/MozDownload.cpp | 4 +++- 3 files changed, 9 insertions(+), 4 deletions(-) (limited to 'embed/mozilla') diff --git a/embed/mozilla/EphyHeaderSniffer.cpp b/embed/mozilla/EphyHeaderSniffer.cpp index 6ef9318de..722ea8672 100644 --- a/embed/mozilla/EphyHeaderSniffer.cpp +++ b/embed/mozilla/EphyHeaderSniffer.cpp @@ -98,8 +98,9 @@ EphyHeaderSniffer::EphyHeaderSniffer (nsIWebBrowserPersist* aPersist, MozillaEmb watcher->GetNewAuthPrompter (nsnull, getter_AddRefs (mAuthPrompt)); mSingle = single; + EphyEmbedSingle **cache_ptr = &mSingle; g_object_add_weak_pointer (G_OBJECT (mSingle), - (gpointer *)&mSingle); + (gpointer *) cache_ptr); } EphyHeaderSniffer::~EphyHeaderSniffer() @@ -108,8 +109,9 @@ EphyHeaderSniffer::~EphyHeaderSniffer() if (mSingle) { + EphyEmbedSingle **cache_ptr = &mSingle; g_object_remove_weak_pointer (G_OBJECT (mSingle), - (gpointer *)&mSingle); + (gpointer *) cache_ptr); } } diff --git a/embed/mozilla/EphyUtils.cpp b/embed/mozilla/EphyUtils.cpp index 3f1b23687..885a49f08 100644 --- a/embed/mozilla/EphyUtils.cpp +++ b/embed/mozilla/EphyUtils.cpp @@ -128,7 +128,8 @@ EphyUtils::FindEmbed (nsIDOMWindow *aDOMWindow) nsresult rv; GtkWidget *mozembed; - rv = window->GetSiteWindow ((void **)&mozembed); + GtkWidget **cache_ptr = &mozembed; + rv = window->GetSiteWindow ((void **) cache_ptr); NS_ENSURE_SUCCESS (rv, nsnull); return mozembed; diff --git a/embed/mozilla/MozDownload.cpp b/embed/mozilla/MozDownload.cpp index eed7adcd9..29fa4d147 100644 --- a/embed/mozilla/MozDownload.cpp +++ b/embed/mozilla/MozDownload.cpp @@ -156,11 +156,13 @@ MozDownload::Init (nsIURI *aSource, if (addToView) { DownloaderView *dview; + EphyDownload **cache_ptr; dview = EPHY_DOWNLOADER_VIEW (ephy_embed_shell_get_downloader_view (embed_shell)); mEphyDownload = mozilla_download_new (this); + cache_ptr = &mEphyDownload; g_object_add_weak_pointer (G_OBJECT (mEphyDownload), - (gpointer *) &mEphyDownload); + (gpointer *) cache_ptr); downloader_view_add_download (dview, mEphyDownload); g_object_unref (mEphyDownload); } -- cgit v1.2.3