Fix a warning in the GTK+ build.
authormrobinson@webkit.org <mrobinson@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 27 Jan 2012 22:53:44 +0000 (22:53 +0000)
committermrobinson@webkit.org <mrobinson@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 27 Jan 2012 22:53:44 +0000 (22:53 +0000)
Reviewed by Gustavo Noronha Silva.

No new tests. This should not change behavior.

* plugins/gtk/PluginViewGtk.cpp:
(WebCore::PluginView::platformStart): Use reinterpet_cast to convert X11 Windows into void pointers.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@106155 268f45cc-cd09-0410-ab3c-d52691b4dbfc

Source/WebCore/ChangeLog
Source/WebCore/plugins/gtk/PluginViewGtk.cpp

index b64b457..3e87981 100644 (file)
@@ -1,3 +1,14 @@
+2012-01-27  Martin Robinson  <mrobinson@igalia.com>
+
+        Fix a warning in the GTK+ build.
+
+        Reviewed by Gustavo Noronha Silva.
+
+        No new tests. This should not change behavior.
+
+        * plugins/gtk/PluginViewGtk.cpp:
+        (WebCore::PluginView::platformStart): Use reinterpet_cast to convert X11 Windows into void pointers.
+
 2012-01-27  Benjamin Poulain  <bpoulain@apple.com>
 
         Speed up the prefix matching of cssPropertyName()
index c785147..abf4f19 100644 (file)
@@ -905,14 +905,14 @@ bool PluginView::platformStart()
         if (m_needsXEmbed) {
             GtkWidget* widget = platformPluginWidget();
             gtk_widget_realize(widget);
-            m_npWindow.window = (void*)gtk_socket_get_id(GTK_SOCKET(platformPluginWidget()));
+            m_npWindow.window = reinterpret_cast<void*>(gtk_socket_get_id(GTK_SOCKET(platformPluginWidget())));
             GdkWindow* window = gtk_widget_get_window(widget);
             ws->display = GDK_WINDOW_XDISPLAY(window);
             ws->visual = GDK_VISUAL_XVISUAL(gdk_window_get_visual(window));
             ws->depth = gdk_visual_get_depth(gdk_window_get_visual(window));
             ws->colormap = XCreateColormap(ws->display, GDK_ROOT_WINDOW(), ws->visual, AllocNone);
         } else {
-            m_npWindow.window = (void*)GTK_XTBIN(platformPluginWidget())->xtwindow;
+            m_npWindow.window = reinterpret_cast<void*>((GTK_XTBIN(platformPluginWidget())->xtwindow));
             ws->display = GTK_XTBIN(platformPluginWidget())->xtdisplay;
             ws->visual = GTK_XTBIN(platformPluginWidget())->xtclient.xtvisual;
             ws->depth = GTK_XTBIN(platformPluginWidget())->xtclient.xtdepth;