Closed Bug 157153 Opened 23 years ago Closed 23 years ago

Bug in layout/html/table/src/nsTableRowGroupFrame.cpp

Categories

(Core :: Layout: Tables, defect)

x86
Linux
defect
Not set
normal

Tracking

()

RESOLVED FIXED

People

(Reporter: tenthumbs, Assigned: bernd_mozilla)

References

Details

(Whiteboard: [whitebox])

Attachments

(1 file)

In layout/html/table/src/nsTableRowGroupFrame.cpp, gcc says nsTableRowGroupFrame.cpp:820: warning: unsigned value < 0 is always 0 and the code is for (rowFrame = startRowFrame, rowIndex = 0; rowFrame && (extra > 0); rowFrame = rowFrame->GetNextRow(), rowIndex++) { RowInfo& rInfo = rowInfo[rowIndex]; if (rInfo.hasPctHeight) { nscoord rowExtra = PR_MAX(0, rInfo.pctHeight - rInfo.height); <**** rowExtra = PR_MIN(rowExtra, extra); UpdateHeights(rInfo, rowExtra, heightOfRows, heightOfUnStyledRows); extra -= rowExtra; } } This all means that rInfo.pctHeight - rInfo.height is an unsigned quantity so it is always > 0 so rowExtra = rInfo.pctHeight - rInfo.height _always_. That doesn't seem to be the intent.
QA Contact: petersen → moied
->Karnaze
Assignee: attinasi → karnaze
Component: Layout → HTMLTables
Whiteboard: [whitebox]
thats the right level for me :-)
Assignee: karnaze → bernd.mielke
*** Bug 166359 has been marked as a duplicate of this bug. ***
Attachment #109034 - Flags: superreview?(roc+moz)
Attachment #109034 - Flags: review?(karnaze)
Comment on attachment 109034 [details] [diff] [review] patch + QueryInterface Cleanup + if(NS_FAILED(result)) + return result; + if(!cellFrame) + return NS_ERROR_FAILURE; + Can't this be simplified to + if(!cellFrame) + return result; or + if(NS_FAILED(result)) + return result;
Chris, yes you are right + if(NS_FAILED(result)) + return result; is already enough.
Comment on attachment 109034 [details] [diff] [review] patch + QueryInterface Cleanup sr=roc+moz
Attachment #109034 - Flags: superreview?(roc+moz) → superreview+
Attachment #109034 - Flags: review?(karnaze) → review+
fix checked in on dec 13th 2002
Status: NEW → RESOLVED
Closed: 23 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: