Last Comment Bug 708963 - Tautological comparison (unsigned int >= 0) in gfxFont.h
: Tautological comparison (unsigned int >= 0) in gfxFont.h
Status: RESOLVED FIXED
:
Product: Core
Classification: Components
Component: Graphics (show other bugs)
: unspecified
: All All
: -- normal (vote)
: mozilla11
Assigned To: Justin Lebar (not reading bugmail)
:
Mentors:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2011-12-08 22:33 PST by Justin Lebar (not reading bugmail)
Modified: 2011-12-16 06:18 PST (History)
2 users (show)
See Also:
Crash Signature:
(edit)
QA Whiteboard:
Iteration: ---
Points: ---
Has Regression Range: ---
Has STR: ---


Attachments
Patch v1 (1.88 KB, patch)
2011-12-08 22:39 PST, Justin Lebar (not reading bugmail)
jmuizelaar: review+
Details | Diff | Splinter Review

Description Justin Lebar (not reading bugmail) 2011-12-08 22:33:57 PST
clang says:

../../dist/include/gfxFont.h:1435:22: warning: comparison of 0 <= unsigned expression is always true [-Wtautological-compare]
        do { if (!(0 <= aPos && aPos < mCharacterCount)) { NS_DebugBreak_P(NS_DEBUG_ASSERTION, "aPos out of range", "0 <= aPos && aPos < mCharacterCount", "../../dist/include/gfxFont.h", 1435); } } while (0);
                   ~ ^  ~~~~
../../dist/include/gfxFont.h:1439:22: warning: comparison of 0 <= unsigned expression is always true [-Wtautological-compare]
        do { if (!(0 <= aPos && aPos < mCharacterCount)) { NS_DebugBreak_P(NS_DEBUG_ASSERTION, "aPos out of range", "0 <= aPos && aPos < mCharacterCount", "../../dist/include/gfxFont.h", 1439); } } while (0);
                   ~ ^  ~~~~
../../dist/include/gfxFont.h:1443:22: warning: comparison of 0 <= unsigned expression is always true [-Wtautological-compare]
        do { if (!(0 <= aPos && aPos < mCharacterCount)) { NS_DebugBreak_P(NS_DEBUG_ASSERTION, "aPos out of range", "0 <= aPos && aPos < mCharacterCount", "../../dist/include/gfxFont.h", 1443); } } while (0);
                   ~ ^  ~~~~
../../dist/include/gfxFont.h:1448:22: warning: comparison of 0 <= unsigned expression is always true [-Wtautological-compare]
        do { if (!(0 <= aPos && aPos < mCharacterCount)) { NS_DebugBreak_P(NS_DEBUG_ASSERTION, "aPos out of range", "0 <= aPos && aPos < mCharacterCount", "../../dist/include/gfxFont.h", 1448); } } while (0);
                   ~ ^  ~~~~
Comment 1 Justin Lebar (not reading bugmail) 2011-12-08 22:39:07 PST
Created attachment 580319 [details] [diff] [review]
Patch v1
Comment 2 Justin Lebar (not reading bugmail) 2011-12-15 13:48:05 PST
https://hg.mozilla.org/integration/mozilla-inbound/rev/3dba01c09c4d
Comment 3 Ed Morley [:emorley] 2011-12-16 06:18:16 PST
https://hg.mozilla.org/mozilla-central/rev/3dba01c09c4d

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