Closed Bug 866947 Opened 7 years ago Closed 7 years ago

nsDocument.cpp:8933:54: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]

Categories

(Core :: DOM: Core & HTML, defect)

x86_64
Linux
defect
Not set

Tracking

()

RESOLVED FIXED
mozilla23

People

(Reporter: dholbert, Assigned: dholbert)

References

(Blocks 1 open bug)

Details

Attachments

(1 file)

New build warning:
{
content/base/src/nsDocument.cpp:8933:54: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
                              mImageTracker.Count() < sOnloadDecodeLimit))
                                                      ^
}

sOnloadDecodeLimit is signed, and mImageTracker.Count() is unsigned (from http://mxr.mozilla.org/mozilla-central/source/xpcom/glue/nsBaseHashtable.h#86 )
I suspect we should just make this pref an unsigned value. It's a count limit, and a negative count is nonsensical (as is a negative limit on a count).
Attachment #743311 - Flags: review?(justin.lebar+bug) → review+
Assignee: nobody → dholbert
Status: NEW → ASSIGNED
https://hg.mozilla.org/mozilla-central/rev/b1c9e6a9abce
Status: ASSIGNED → RESOLVED
Closed: 7 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla23
Component: DOM → DOM: Core & HTML
You need to log in before you can comment on or make changes to this bug.