GCC 4.6 build warning: nsContentEventHandler.cpp:369:28: warning: comparison of unsigned expression >= 0 is always true [-Wtype-limits]

RESOLVED FIXED in mozilla15

Status

()

Core
Event Handling
RESOLVED FIXED
5 years ago
5 years ago

People

(Reporter: dholbert, Assigned: dholbert)

Tracking

(Blocks: 1 bug)

Trunk
mozilla15
x86_64
Linux
Points:
---
Dependency tree / graph

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment)

(Assignee)

Description

5 years ago
{
/mozilla/content/events/src/nsContentEventHandler.cpp: In member function ‘nsresult nsContentEventHandler::ExpandToClusterBoundary(nsIContent*, bool, PRUint32*)’:
/mozilla/content/events/src/nsContentEventHandler.cpp:369:28: warning: comparison of unsigned expression >= 0 is always true [-Wtype-limits]
}

Turns out this has been an issue since the original version of this file (nsQueryContentEventHandler.cpp) was created, back in 2006, but GCC has only recently gotten smart enough to warn us. :)

MXR link:
http://bonsai.mozilla.org/cvsblame.cgi?file=mozilla/content/events/src/nsQueryContentEventHandler.cpp&rev=1.1&mark=221-224#219
(Assignee)

Comment 1

5 years ago
Created attachment 616199 [details] [diff] [review]
fix v1 [just remove the always-true comparison]
Assignee: nobody → dholbert
Status: NEW → ASSIGNED
Attachment #616199 - Flags: review?(masayuki)
(Assignee)

Updated

5 years ago
Attachment #616199 - Attachment description: fix → fix v1 [just remove the always-true comparison]
Comment on attachment 616199 [details] [diff] [review]
fix v1 [just remove the always-true comparison]

Thanks!
Attachment #616199 - Flags: review?(masayuki) → review+
(Assignee)

Comment 3

5 years ago
https://hg.mozilla.org/projects/birch/rev/d81023c3e582
(Assignee)

Updated

5 years ago
Target Milestone: --- → mozilla15
https://hg.mozilla.org/mozilla-central/rev/d81023c3e582
Status: ASSIGNED → RESOLVED
Last Resolved: 5 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.