Closed
Bug 744464
Opened 12 years ago
Closed 12 years ago
nsPlainTextSerializer.cpp:414:30: warning: comparison of unsigned expression >= 0 is always true [-Wtype-limits]
Categories
(Core :: General, defect)
Tracking
()
RESOLVED
FIXED
mozilla14
People
(Reporter: dholbert, Assigned: dholbert)
References
(Blocks 1 open bug)
Details
Attachments
(1 file)
895 bytes,
patch
|
smaug
:
review+
|
Details | Diff | Splinter Review |
GCC 4.6.3 build warning: nsPlainTextSerializer.cpp:414:30: warning: comparison of unsigned expression >= 0 is always true [-Wtype-limits] from this chunk: > 412 if (id == nsGkAtoms::head) { > 413 --mHeadLevel; > 414 NS_ASSERTION(mHeadLevel >= 0, "mHeadLevel < 0"); where mHeadLevel is a PRUint32 (and was when that assertion was added, in bug 418727) Looks like the purpose here is to be sure we don't decrement a value that is at zero. We should probably be asserting that our value is nonzero before we decrement it.
Assignee | ||
Comment 1•12 years ago
|
||
MXR link to this chunk in the source: http://mxr.mozilla.org/mozilla-central/source/content/base/src/nsPlainTextSerializer.cpp?mark=414-415#412
Assignee | ||
Comment 2•12 years ago
|
||
Assignee: nobody → dholbert
Status: NEW → ASSIGNED
Assignee | ||
Updated•12 years ago
|
Attachment #614056 -
Flags: review?(bugs)
Updated•12 years ago
|
Attachment #614056 -
Flags: review?(bugs) → review+
Assignee | ||
Comment 3•12 years ago
|
||
https://hg.mozilla.org/integration/mozilla-inbound/rev/165ec2dea412
Target Milestone: --- → mozilla14
Comment 4•12 years ago
|
||
https://hg.mozilla.org/mozilla-central/rev/165ec2dea412
Status: ASSIGNED → RESOLVED
Closed: 12 years ago
Resolution: --- → FIXED
You need to log in
before you can comment on or make changes to this bug.
Description
•