RESOLVED FIXED 16342
Build Warning and Error fixes in WebCore GTK+
https://bugs.webkit.org/show_bug.cgi?id=16342
Summary Build Warning and Error fixes in WebCore GTK+
Rodney Dawes
Reported 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.
Attachments
Patch to fix warnings and errors (3.65 KB, patch)
2007-12-07 11:14 PST, Rodney Dawes
no flags
Updated patch (2.85 KB, patch)
2007-12-10 11:17 PST, Rodney Dawes
mjs: review+
Mark Rowe (bdash)
Comment 1 2007-12-07 10:35:52 PST
Did you mean to attach a patch?
Rodney Dawes
Comment 2 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. :)
Mark Rowe (bdash)
Comment 3 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?
Rodney Dawes
Comment 4 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.
Maciej Stachowiak
Comment 5 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.
Alp Toker
Comment 6 2007-12-12 09:27:43 PST
Landed in r28654 with minor style fixes (remove excess parentheses).
Note You need to log in before you can comment on or make changes to this bug.