Closed Bug 800535 Opened 12 years ago Closed 12 years ago

nsSimplePageSequence.cpp:673:53: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]

Categories

(Core :: Layout, defect)

x86_64
Linux
defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla19

People

(Reporter: dholbert, Assigned: dholbert)

References

(Blocks 1 open bug)

Details

Attachments

(1 file)

Filing bug for new-ish build warning (using GCC 4.7):
{
/mozilla/layout/generic/nsSimplePageSequence.cpp: In member function ‘virtual nsresult nsSimplePageSequenceFrame::PrePrintNextPage(nsITimerCallback*, bool*)’:

/mozilla/layout/generic/nsSimplePageSequence.cpp:673:53: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
}

...for this code:
> 664   int32_t doneCounter = 0;
[...]
> 669       doneCounter++;
[...]
> 672   // If all canvas have finished rendering, return true, otherwise false.
> 673   *aDone = doneCounter == mCurrentCanvasList.Length();
https://mxr.mozilla.org/mozilla-central/source/layout/generic/nsSimplePageSequence.cpp?mark=664-664,673-673#664

https://mxr.mozilla.org/mozilla-central/source/layout/generic/nsSimplePageSequence.cpp?mark=664-664,669-669,673-673#664

Looks like doneCounter should just be unsigned -- it starts at 0 and only increases from there, so there's no reason to make it a signed value.
Attached patch fixSplinter Review
Attachment #670526 - Flags: review?(bdahl)
Attachment #670526 - Flags: review?(bdahl) → review+
https://hg.mozilla.org/mozilla-central/rev/d9940b9d6f5f
Status: ASSIGNED → RESOLVED
Closed: 12 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla19
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: