Closed Bug 746646 Opened 8 years ago Closed 8 years ago

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

Categories

(Core :: DOM: UI Events & Focus Handling, defect)

x86_64
Linux
defect
Not set

Tracking

()

RESOLVED FIXED
mozilla15

People

(Reporter: dholbert, Assigned: dholbert)

References

(Blocks 1 open bug)

Details

Attachments

(1 file)

{
/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: nobody → dholbert
Status: NEW → ASSIGNED
Attachment #616199 - Flags: review?(masayuki)
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+
https://hg.mozilla.org/mozilla-central/rev/d81023c3e582
Status: ASSIGNED → RESOLVED
Closed: 8 years ago
Resolution: --- → FIXED
Component: Event Handling → User events and focus handling
You need to log in before you can comment on or make changes to this bug.