Closed Bug 708963 Opened 8 years ago Closed 8 years ago

Tautological comparison (unsigned int >= 0) in gfxFont.h

Categories

(Core :: Graphics, defect)

defect
Not set

Tracking

()

RESOLVED FIXED
mozilla11

People

(Reporter: justin.lebar+bug, Assigned: justin.lebar+bug)

Details

Attachments

(1 file)

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);
                   ~ ^  ~~~~
Component: Build Config → Graphics
QA Contact: build-config → thebes
Attached patch Patch v1Splinter Review
Attachment #580319 - Flags: review?(jmuizelaar)
Attachment #580319 - Flags: review?(jmuizelaar) → review+
Assignee: nobody → justin.lebar+bug
Whiteboard: [needs landing]
https://hg.mozilla.org/integration/mozilla-inbound/rev/3dba01c09c4d
OS: Mac OS X → All
Hardware: x86 → All
Whiteboard: [needs landing]
https://hg.mozilla.org/mozilla-central/rev/3dba01c09c4d
Status: NEW → RESOLVED
Closed: 8 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla11
You need to log in before you can comment on or make changes to this bug.