diff options
author | Diego Escalante Urrelo <diegoe@gnome.org> | 2007-08-15 15:46:04 +0800 |
---|---|---|
committer | Diego Escalante Urrelo <diegoe@src.gnome.org> | 2007-08-15 15:46:04 +0800 |
commit | ec96881f6e30e029c308eefe982a30da6fdca779 (patch) | |
tree | 6c540eadd212739a51ccc773a983d393d95b94c7 /embed/mozilla | |
parent | cb1f9910f188e2db04be62a2c41fbe95255348c3 (diff) | |
download | gsoc2013-epiphany-ec96881f6e30e029c308eefe982a30da6fdca779.tar gsoc2013-epiphany-ec96881f6e30e029c308eefe982a30da6fdca779.tar.gz gsoc2013-epiphany-ec96881f6e30e029c308eefe982a30da6fdca779.tar.bz2 gsoc2013-epiphany-ec96881f6e30e029c308eefe982a30da6fdca779.tar.lz gsoc2013-epiphany-ec96881f6e30e029c308eefe982a30da6fdca779.tar.xz gsoc2013-epiphany-ec96881f6e30e029c308eefe982a30da6fdca779.tar.zst gsoc2013-epiphany-ec96881f6e30e029c308eefe982a30da6fdca779.zip |
Fix strict-aliasing warnings, patch by Cosimo Cecchi. Happy 10 years
2007-08-15 Diego Escalante Urrelo <diegoe@gnome.org>
* 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
Diffstat (limited to 'embed/mozilla')
-rw-r--r-- | embed/mozilla/EphyHeaderSniffer.cpp | 6 | ||||
-rw-r--r-- | embed/mozilla/EphyUtils.cpp | 3 | ||||
-rw-r--r-- | embed/mozilla/MozDownload.cpp | 4 |
3 files changed, 9 insertions, 4 deletions
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); } |