Reviewed by Maciej.
http://bugs.webkit.org/show_bug.cgi?id=16342
Build Warning and Error fixes in WebCore GTK+
Use C-style casts for casting function pointers to gpointer
Use static_cast<int> to cast a float to int to fix a warning
* platform/gtk/PlatformScrollBarGtk.cpp:
(PlatformScrollbar::PlatformScrollbar):
(PlatformScrollbar::~PlatformScrollbar):
(PlatformScrollbar::gtkValueChanged):
* platform/gtk/ThreadingGtk.cpp:
(callFunctionOnMainThread):
(callOnMainThread):
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@28654
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
+2007-12-12 Rodney Dawes <dobey@wayofthemonkey.com>
+
+ Reviewed by Maciej.
+
+ http://bugs.webkit.org/show_bug.cgi?id=16342
+ Build Warning and Error fixes in WebCore GTK+
+
+ Use C-style casts for casting function pointers to gpointer
+ Use static_cast<int> to cast a float to int to fix a warning
+
+ * platform/gtk/PlatformScrollBarGtk.cpp:
+ (PlatformScrollbar::PlatformScrollbar):
+ (PlatformScrollbar::~PlatformScrollbar):
+ (PlatformScrollbar::gtkValueChanged):
+ * platform/gtk/ThreadingGtk.cpp:
+ (callFunctionOnMainThread):
+ (callOnMainThread):
+
2007-12-12 Dan Bernstein <mitz@apple.com>
Reviewed by Darin Adler.
/*
* the Widget does not take over ownership.
*/
- g_signal_handlers_disconnect_by_func(G_OBJECT(gtkWidget()), reinterpret_cast<gpointer>(PlatformScrollbar::gtkValueChanged), this);
- g_signal_handlers_disconnect_by_func(G_OBJECT(gtkWidget()), reinterpret_cast<gpointer>(gtkScrollEventCallback), this);
+ g_signal_handlers_disconnect_by_func(G_OBJECT(gtkWidget()), (gpointer)PlatformScrollbar::gtkValueChanged, this);
+ g_signal_handlers_disconnect_by_func(G_OBJECT(gtkWidget()), (gpointer)gtkScrollEventCallback, this);
g_object_unref(G_OBJECT(gtkWidget()));
}
void PlatformScrollbar::gtkValueChanged(GtkAdjustment*, PlatformScrollbar* that)
{
- that->setValue(gtk_adjustment_get_value(that->m_adjustment));
+ that->setValue(static_cast<int>(gtk_adjustment_get_value(that->m_adjustment)));
}
static int scrollbarSize()
static gboolean callFunctionOnMainThread(gpointer data)
{
- void (*function)() = reinterpret_cast<void(*)()>(data);
+ void (*function)() = (void(*)())data;
function();
return FALSE;
}
void callOnMainThread(void (*function)())
{
ASSERT(function);
- g_timeout_add(0, callFunctionOnMainThread, reinterpret_cast<gpointer>(function));
+ g_timeout_add(0, callFunctionOnMainThread, (gpointer)function);
}
void initializeThreading()