Closed
Bug 658516
Opened 13 years ago
Closed 13 years ago
nsHTMLEditRules.cpp:5810:52: warning: comparison between signed and unsigned integer expressions
Categories
(Core :: DOM: Editor, defect)
Core
DOM: Editor
Tracking
()
VERIFIED
FIXED
mozilla7
People
(Reporter: dholbert, Assigned: ehsan.akhgari)
Details
(Whiteboard: [build_warning])
Attachments
(1 file)
1.14 KB,
patch
|
roc
:
review+
|
Details | Diff | Splinter Review |
Filing bug on this warning: editor/libeditor/html/nsHTMLEditRules.cpp:5810:52: warning: comparison between signed and unsigned integer expressions Flagged code is: > NS_ASSERTION(rangeCount == rangeItemArray.Length(), "How did that happen?"); where rangeCount is a signed int. The contextual code already assumes it's non-negative[1], so it should be fine to just cast it to an unsigned value here. [1] At this point in the code, we've just called rangeItemArray.AppendElements(rangeCount), which would fail horribly if rangeCount were negative. http://mxr.mozilla.org/mozilla-central/source/editor/libeditor/html/nsHTMLEditRules.cpp#5806
Assignee | ||
Comment 1•13 years ago
|
||
Comment on attachment 534119 [details] [diff] [review] Patch (v1) Review of attachment 534119 [details] [diff] [review]: -----------------------------------------------------------------
Attachment #534119 -
Flags: review?(roc) → review+
Assignee | ||
Updated•13 years ago
|
Keywords: checkin-needed
Comment 3•13 years ago
|
||
http://hg.mozilla.org/mozilla-central/rev/3fa9d9b92de8
Status: ASSIGNED → RESOLVED
Closed: 13 years ago
Keywords: checkin-needed
Resolution: --- → FIXED
Target Milestone: --- → mozilla7
Comment 4•12 years ago
|
||
Is this issue fixed? Thanks.
Reporter | ||
Comment 5•12 years ago
|
||
Yes. (link to patched chunk of source: http://mxr.mozilla.org/mozilla-central/source/editor/libeditor/html/nsHTMLEditRules.cpp?mark=5848-5849#5848 )
Status: RESOLVED → VERIFIED
You need to log in
before you can comment on or make changes to this bug.
Description
•