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

RESOLVED FIXED in mozilla11

Status

()

Core
Graphics
RESOLVED FIXED
6 years ago
6 years ago

People

(Reporter: Justin Lebar (not reading bugmail), Assigned: Justin Lebar (not reading bugmail))

Tracking

unspecified
mozilla11
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment)

(Assignee)

Description

6 years ago
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);
                   ~ ^  ~~~~
(Assignee)

Updated

6 years ago
Component: Build Config → Graphics
QA Contact: build-config → thebes
(Assignee)

Comment 1

6 years ago
Created attachment 580319 [details] [diff] [review]
Patch v1
Attachment #580319 - Flags: review?(jmuizelaar)
Attachment #580319 - Flags: review?(jmuizelaar) → review+
(Assignee)

Updated

6 years ago
Assignee: nobody → justin.lebar+bug
Whiteboard: [needs landing]
(Assignee)

Comment 2

6 years ago
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
Last Resolved: 6 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla11
You need to log in before you can comment on or make changes to this bug.