Last Comment Bug 746646 - GCC 4.6 build warning: nsContentEventHandler.cpp:369:28: warning: comparison of unsigned expression >= 0 is always true [-Wtype-limits]
: GCC 4.6 build warning: nsContentEventHandler.cpp:369:28: warning: comparison ...
Status: RESOLVED FIXED
:
Product: Core
Classification: Components
Component: Event Handling (show other bugs)
: Trunk
: x86_64 Linux
: -- normal (vote)
: mozilla15
Assigned To: Daniel Holbert [:dholbert]
:
: Andrew Overholt [:overholt]
Mentors:
Depends on:
Blocks: buildwarning 348341
  Show dependency treegraph
 
Reported: 2012-04-18 10:33 PDT by Daniel Holbert [:dholbert]
Modified: 2012-04-24 18:02 PDT (History)
2 users (show)
See Also:
Crash Signature:
(edit)
QA Whiteboard:
Iteration: ---
Points: ---
Has Regression Range: ---
Has STR: ---


Attachments
fix v1 [just remove the always-true comparison] (1.60 KB, patch)
2012-04-18 10:36 PDT, Daniel Holbert [:dholbert]
masayuki: review+
Details | Diff | Splinter Review

Description Daniel Holbert [:dholbert] 2012-04-18 10:33:43 PDT
{
/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
Comment 1 Daniel Holbert [:dholbert] 2012-04-18 10:36:47 PDT
Created attachment 616199 [details] [diff] [review]
fix v1 [just remove the always-true comparison]
Comment 2 Masayuki Nakano [:masayuki] (Mozilla Japan) 2012-04-18 18:00:22 PDT
Comment on attachment 616199 [details] [diff] [review]
fix v1 [just remove the always-true comparison]

Thanks!
Comment 3 Daniel Holbert [:dholbert] 2012-04-19 10:39:58 PDT
https://hg.mozilla.org/projects/birch/rev/d81023c3e582

Note You need to log in before you can comment on or make changes to this bug.