Closed
Bug 747469
Opened 12 years ago
Closed 12 years ago
GCC 4.6 warning: nsHTMLDocument.cpp:2308:49: warning: comparison of unsigned expression >= 0 is always true [-Wtype-limits]
Categories
(Core :: DOM: Core & HTML, defect)
Tracking
()
RESOLVED
FIXED
mozilla15
People
(Reporter: dholbert, Assigned: dholbert)
References
(Blocks 1 open bug)
Details
Attachments
(1 file)
1.00 KB,
patch
|
ehsan.akhgari
:
review+
|
Details | Diff | Splinter Review |
{ content/html/document/src/nsHTMLDocument.cpp: In member function ‘virtual nsresult nsHTMLDocument::ChangeContentEditableCount(nsIContent*, PRInt32)’: content/html/document/src/nsHTMLDocument.cpp:2308:49: warning: comparison of unsigned expression >= 0 is always true [-Wtype-limits] } This is from this code... > 2305 nsHTMLDocument::ChangeContentEditableCount(nsIContent *aElement, > 2306 PRInt32 aChange) > 2307 { > 2308 NS_ASSERTION(mContentEditableCount + aChange >= 0, > 2309 "Trying to decrement too much."); ...added in this cset: http://hg.mozilla.org/mozilla-central/rev/15cda702358e mContentEditableCount is unsigned, so [mContentEditableCount + aChange] is unsigned and will always be >=0 by definition. So the assertion doesn't check what it's trying to check. Simplest/cleanest fix is probably to just add a PRInt32 cast.
Assignee | ||
Comment 1•12 years ago
|
||
Updated•12 years ago
|
Attachment #617040 -
Flags: review?(peterv) → review+
Assignee | ||
Comment 2•12 years ago
|
||
https://hg.mozilla.org/projects/birch/rev/5da92b15cfeb
Target Milestone: --- → mozilla15
Comment 3•12 years ago
|
||
https://hg.mozilla.org/mozilla-central/rev/5da92b15cfeb
Status: ASSIGNED → RESOLVED
Closed: 12 years ago
Resolution: --- → FIXED
Updated•5 years ago
|
Component: DOM → DOM: Core & HTML
You need to log in
before you can comment on or make changes to this bug.
Description
•