Closed Bug 934262 Opened 11 years ago Closed 11 years ago

Fix -Wtautological-constant-out-of-range-compare warnings in js/src/jit/

Categories

(Core :: JavaScript Engine: JIT, defect)

x86
macOS
defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla28
Tracking Status
firefox27 --- wontfix
firefox28 --- fixed

People

(Reporter: cpeterson, Assigned: cpeterson)

References

(Blocks 1 open bug)

Details

(Whiteboard: [qa-])

Attachments

(1 file)

I hit the following compiler warnings (as errors) when building a 32-bit optimized debug build on OS X: js/src/jit/AsmJSModule.cpp:863:37 [-Wsign-compare] comparison of integers of different signs: 'int' and 'const uint32_t' (aka 'const unsigned int') js/src/jit/Snapshots.cpp:365:26: warning: comparison of constant 28 with expression of type 'Code' (aka 'XMMRegisterID') is always true [-Wtautological-constant-out-of-range-compare] JS_ASSERT(reg.code() < MIN_REG_FIELD_ESC); ~~~~~~~~~~ ^ ~~~~~~~~~~~~~~~~~ js/src/jit/Snapshots.cpp:522:26: warning: comparison of constant 28 with expression of type 'Code' (aka 'XMMRegisterID') is always true [-Wtautological-constant-out-of-range-compare] JS_ASSERT(reg.code() < MIN_REG_FIELD_ESC); ~~~~~~~~~~ ^ ~~~~~~~~~~~~~~~~~
Attachment #826491 - Flags: review?(luke)
Comment on attachment 826491 [details] [diff] [review] fix-warnings.patch Thanks!
Attachment #826491 - Flags: review?(luke) → review+
Status: ASSIGNED → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla28
Whiteboard: [qa-]
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: