Bug 16342 - Build Warning and Error fixes in WebCore GTK+
Summary: Build Warning and Error fixes in WebCore GTK+
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebKitGTK (show other bugs)
Version: 528+ (Nightly build)
Hardware: PC OS X 10.4
: P2 Normal
Assignee: Nobody
URL:
Keywords: Gtk
Depends on:
Blocks:
 
Reported: 2007-12-07 08:17 PST by Rodney Dawes
Modified: 2007-12-12 09:27 PST (History)
2 users (show)

See Also:


Attachments
Patch to fix warnings and errors (3.65 KB, patch)
2007-12-07 11:14 PST, Rodney Dawes
no flags Details | Formatted Diff | Diff
Updated patch (2.85 KB, patch)
2007-12-10 11:17 PST, Rodney Dawes
mjs: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Rodney Dawes 2007-12-07 08:17:59 PST
There are multiple errors of the following type in platform/gtk:

../../../WebCore/platform/gtk/PlatformScrollBarGtk.cpp:76: 
               error: ISO C++ forbids casting between pointer-to-function and 
               pointer-to-object
../../../WebCore/platform/gtk/PlatformScrollBarGtk.cpp:77: 
               error: ISO C++ forbids casting between pointer-to-function and 
               pointer-to-object

There are also a couple of warnings about other casts as well. The attached patch fixes these problems.
Comment 1 Mark Rowe (bdash) 2007-12-07 10:35:52 PST
Did you mean to attach a patch?
Comment 2 Rodney Dawes 2007-12-07 11:14:38 PST
Created attachment 17775 [details]
Patch to fix warnings and errors

Here's the patch. Had to update, get lunch, and tweak a few things. :)
Comment 3 Mark Rowe (bdash) 2007-12-08 11:19:32 PST
Is there a compiler flag that we can use to disable the warning about casting a function-pointer to an object-pointer?  That would be much cleaner than introducing C-style casts.

What does moving the initialization of m_adjustment out of the initialization list fix?
Comment 4 Rodney Dawes 2007-12-10 11:17:36 PST
Created attachment 17822 [details]
Updated patch

Here's an updated patch without the m_adjustment change. I just tried to get the warning again, and it's not appearing. I have no idea why. I also don't know what the warning flag would be for the ISO C++ warnings.
Comment 5 Maciej Stachowiak 2007-12-12 04:56:10 PST
Comment on attachment 17822 [details]
Updated patch

r=me

The C-style casts are probably not that big a deal for extreme casting like this.
Comment 6 Alp Toker 2007-12-12 09:27:43 PST
Landed in r28654 with minor style fixes (remove excess parentheses).