RESOLVED FIXED Bug 13985
WebCore/rendering/RenderTable.cpp fails to compile with gcc 4.2.x
https://bugs.webkit.org/show_bug.cgi?id=13985
Summary WebCore/rendering/RenderTable.cpp fails to compile with gcc 4.2.x
Bernhard Rosenkraenzer
Reported 2007-06-04 07:58:31 PDT
../../../WebCore/rendering/RenderTable.cpp: In member function 'int WebCore::RenderTable::calcBorderLeft() const': ../../../WebCore/rendering/RenderTable.cpp:722: error: no matching function for call to 'max(unsigned int&, const short unsigned int:12&)' ../../../WebCore/rendering/RenderTable.cpp:735: error: no matching function for call to 'max(unsigned int&, const short unsigned int:12&)' ../../../WebCore/rendering/RenderTable.cpp:749: error: no matching function for call to 'max(unsigned int&, const short unsigned int:12&)' ../../../WebCore/rendering/RenderTable.cpp:751: error: no matching function for call to 'max(unsigned int&, const short unsigned int:12&)' ../../../WebCore/rendering/RenderTable.cpp: In member function 'int WebCore::RenderTable::calcBorderRight() const': ../../../WebCore/rendering/RenderTable.cpp:781: error: no matching function for call to 'max(unsigned int&, const short unsigned int:12&)' ../../../WebCore/rendering/RenderTable.cpp:794: error: no matching function for call to 'max(unsigned int&, const short unsigned int:12&)' ../../../WebCore/rendering/RenderTable.cpp:808: error: no matching function for call to 'max(unsigned int&, const short unsigned int:12&)' ../../../WebCore/rendering/RenderTable.cpp:810: error: no matching function for call to 'max(unsigned int&, const short unsigned int:12&)' make[1]: *** [tmp/RenderTable.o] Error 1
Attachments
Fix (2.52 KB, patch)
2007-06-04 08:15 PDT, Bernhard Rosenkraenzer
ddkilzer: review-
Fix adjusted to WebKit coding style (3.03 KB, patch)
2007-06-05 00:56 PDT, Bernhard Rosenkraenzer
no flags
Fix adjusted to WebKit coding style (3.00 KB, patch)
2007-06-05 00:57 PDT, Bernhard Rosenkraenzer
mrowe: review-
Same patch, rediffed to not need patch -p1 (3.40 KB, patch)
2007-06-20 09:13 PDT, Bernhard Rosenkraenzer
sam: review+
Bernhard Rosenkraenzer
Comment 1 2007-06-04 08:15:48 PDT
Created attachment 14851 [details] Fix The problem is that "unsigned int" and "unsigned int:12" are no longer considered the same type.
David Kilzer (:ddkilzer)
Comment 2 2007-06-04 09:48:34 PDT
Comment on attachment 14851 [details] Fix Thanks for posting a patch to fix this, Bernhard! In the future, please set the "review?" flag on patches so that they may be flagged for review, and please add a ChangeLog entry for the updates. See this page for more details: http://webkit.org/coding/contributing.html >- borderWidth = max(borderWidth, gb.width); >+ borderWidth = max(borderWidth, (unsigned int)gb.width); In all of these cases, we prefer to use the static_cast<>() syntax and "unsigned" instead of "unsigned int": >+ borderWidth = max(borderWidth, static_cast<unsigned>(gb.width)); Please add a ChangeLog entry, update the patch and repost. Thanks!
Bernhard Rosenkraenzer
Comment 3 2007-06-05 00:56:00 PDT
Created attachment 14859 [details] Fix adjusted to WebKit coding style
Bernhard Rosenkraenzer
Comment 4 2007-06-05 00:57:32 PDT
Created attachment 14860 [details] Fix adjusted to WebKit coding style Forgot to do the unsigned int -> unsigned bit, updated patch
Sam Weinig
Comment 5 2007-06-06 11:45:22 PDT
Comment on attachment 14860 [details] Fix adjusted to WebKit coding style This looks fine.
Mark Rowe (bdash)
Comment 6 2007-06-18 10:03:30 PDT
Comment on attachment 14860 [details] Fix adjusted to WebKit coding style Your patch is in some weird format that svn-apply does not understand. Can you please resubmit it in a format that we can actually apply?
Bernhard Rosenkraenzer
Comment 7 2007-06-20 09:13:50 PDT
Created attachment 15140 [details] Same patch, rediffed to not need patch -p1 The patch was a standard unified diff, you just need to use patch -p1 to apply it because its path names include the name of the top level directory. Rediffed to apply with patch -p0, which seems to be what svn-apply uses.
Mark Rowe (bdash)
Comment 8 2007-07-06 04:45:30 PDT
Landed in r24058. Thanks for the patch! I think the thing that threw svn-apply off was the lack of the "Index: path/to/file" headers in the patch. Keep in mind that our style guideline requires spaces rather than tabs for indentation, even in the ChangeLog.
Note You need to log in before you can comment on or make changes to this bug.