Closed
Bug 166359
Opened 22 years ago
Closed 22 years ago
Incorrect comparison in nsTableRowGroupFrame.cpp
Categories
(Core :: Layout: Tables, defect)
Tracking
()
RESOLVED
DUPLICATE
of bug 157153
People
(Reporter: tenthumbs, Assigned: karnaze)
Details
(Whiteboard: [whitebox])
Attachments
(1 file)
1.86 KB,
patch
|
Details | Diff | Splinter Review |
In mozilla/layout/html/table/src/nsTableRowGroupFrame.cpp, gcc3.1.1 says: nsTableRowGroupFrame.cpp: In member function `void nsTableRowGroupFrame::CalculateRowHeights(nsIPresContext*, nsHTMLReflowMetrics&, const nsHTMLReflowState&, nsTableRowFrame*)': nsTableRowGroupFrame.cpp:820: warning: comparison of unsigned expression < 0 is always false The code is: nscoord rowExtra = PR_MAX(0, rInfo.pctHeight - rInfo.height); Since rInfo.pctHeight - rInfo.height is unsigned, its value will be used whether it's right or not.
Comment 1•22 years ago
|
||
to correct component.
Assignee: attinasi → karnaze
Component: Layout → HTMLTables
QA Contact: petersen → amar
Comment 2•22 years ago
|
||
If it were me, I would do nscoord rowExtra = (rInfo.pctHeight > rInfo.height) ? rInfo.pctHeight - rInfo.height : 0; but the patch should work as it is. The comment about subtracting unsigneds isn't really right. It's not that it's bad but that it's always positive.
Updated•22 years ago
|
Whiteboard: [whitebox]
*** This bug has been marked as a duplicate of 157153 ***
Status: NEW → RESOLVED
Closed: 22 years ago
Resolution: --- → DUPLICATE
You need to log in
before you can comment on or make changes to this bug.
Description
•