Closed Bug 566414 Opened 14 years ago Closed 14 years ago

Signed/unsigned comparison warnings in editor

Categories

(Core :: DOM: Editor, defect)

x86
Linux
defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla1.9.3a5

People

(Reporter: jdm, Assigned: jdm)

Details

Attachments

(1 file)

Attached patch PatchSplinter Review
/home/t_mattjo/src/firefox/mobilebase/editor/txtsvc/src/nsTextServicesDocument.cpp:4044: warning: comparison between signed and unsigned integer expressions
/home/t_mattjo/src/firefox/mobilebase/editor/txtsvc/src/nsTextServicesDocument.cpp:4045: warning: comparison between signed and unsigned integer expressions
/home/t_mattjo/src/firefox/mobilebase/editor/txtsvc/src/nsTextServicesDocument.cpp:4045: warning: comparison between signed and unsigned integer expressions
/home/t_mattjo/src/firefox/mobilebase/editor/txtsvc/src/nsTextServicesDocument.cpp:4068: warning: comparison between signed and unsigned integer expressions
/home/t_mattjo/src/firefox/mobilebase/editor/txtsvc/src/nsTextServicesDocument.cpp:4068: warning: comparison between signed and unsigned integer expressions
/home/t_mattjo/src/firefox/mobilebase/editor/txtsvc/src/nsTextServicesDocument.cpp:4070: warning: comparison between signed and unsigned integer expressions

/home/t_mattjo/src/firefox/mobilebase/editor/libeditor/html/nsWSRunObject.cpp: In member function ‘nsresult nsWSRunObject::GetWSNodes()’:
/home/t_mattjo/src/firefox/mobilebase/editor/libeditor/html/nsWSRunObject.cpp:736: warning: comparison between signed and unsigned integer expressions
/home/t_mattjo/src/firefox/mobilebase/editor/libeditor/html/nsWSRunObject.cpp:804: warning: comparison between signed and unsigned integer expressions
/home/t_mattjo/src/firefox/mobilebase/editor/libeditor/html/nsWSRunObject.cpp:863: warning: comparison between signed and unsigned integer expressions
/home/t_mattjo/src/firefox/mobilebase/editor/libeditor/html/nsWSRunObject.cpp:866: warning: comparison between signed and unsigned integer expressions
/home/t_mattjo/src/firefox/mobilebase/editor/libeditor/html/nsWSRunObject.cpp:869: warning: comparison between signed and unsigned integer expressions
/home/t_mattjo/src/firefox/mobilebase/editor/libeditor/html/nsWSRunObject.cpp:935: warning: comparison between signed and unsigned integer expressions
/home/t_mattjo/src/firefox/mobilebase/editor/libeditor/html/nsWSRunObject.cpp:938: warning: comparison between signed and unsigned integer expressions
/home/t_mattjo/src/firefox/mobilebase/editor/libeditor/html/nsWSRunObject.cpp: In member function ‘nsresult nsWSRunObject::DeleteChars(nsIDOMNode*, PRInt32, nsIDOMNode*, PRInt32, nsWSRunObject::AreaRestriction)’:
/home/t_mattjo/src/firefox/mobilebase/editor/libeditor/html/nsWSRunObject.cpp:1590: warning: comparison between signed and unsigned integer expressions
/home/t_mattjo/src/firefox/mobilebase/editor/libeditor/html/nsWSRunObject.cpp: In member function ‘nsresult nsWSRunObject::GetCharAfter(nsWSRunObject::WSPoint&, nsWSRunObject::WSPoint*)’:
/home/t_mattjo/src/firefox/mobilebase/editor/libeditor/html/nsWSRunObject.cpp:1698: warning: comparison between signed and unsigned integer expressions
/home/t_mattjo/src/firefox/mobilebase/editor/libeditor/html/nsWSRunObject.cpp: In member function ‘PRUnichar nsWSRunObject::GetCharAt(nsIContent*, PRInt32)’:
/home/t_mattjo/src/firefox/mobilebase/editor/libeditor/html/nsWSRunObject.cpp:1944: warning: comparison between signed and unsigned integer expressions

/home/t_mattjo/src/firefox/mobilebase/editor/libeditor/text/nsTextEditRules.cpp:897: warning: comparison between signed and unsigned integer expressions
/home/t_mattjo/src/firefox/mobilebase/editor/libeditor/text/nsTextEditRules.cpp: In member function ‘nsresult nsTextEditRules::WillDeleteSelection(nsISelection*, short int, PRBool*, PRBool*)’:
/home/t_mattjo/src/firefox/mobilebase/editor/libeditor/text/nsTextEditRules.cpp:1031: warning: comparison between signed and unsigned integer expressions
/home/t_mattjo/src/firefox/mobilebase/editor/libeditor/text/nsTextEditRules.cpp: In member function ‘virtual nsresult nsTextEditRules::Notify(nsITimer*)’:
/home/t_mattjo/src/firefox/mobilebase/editor/libeditor/text/nsTextEditRules.cpp:1450: warning: comparison between signed and unsigned integer expressions
Attachment #445773 - Attachment is patch: true
Attachment #445773 - Attachment mime type: application/octet-stream → text/plain
Attachment #445773 - Flags: review?(ehsan)
Comment on attachment 445773 [details] [diff] [review]
Patch

>     PRUint32 len = textNode->TextLength();
>-    if (mOffset<len)
>+    if (PRUint16(mOffset)<len)

Why PRUint16?
Because mOffset is a PRInt16.
Comment on attachment 445773 [details] [diff] [review]
Patch

Ah, you're right.  I took this for nsWSRunObject::mOffset by mistake.  r=me.
Attachment #445773 - Flags: review?(ehsan) → review+
Assignee: nobody → josh
Keywords: checkin-needed
http://hg.mozilla.org/mozilla-central/rev/4ec9565fd532

Thanks for the patch, Josh!
Status: NEW → RESOLVED
Closed: 14 years ago
Keywords: checkin-needed
Resolution: --- → FIXED
Target Milestone: --- → mozilla1.9.3a5
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: