Closed Bug 1047301 Opened 10 years ago Closed 10 years ago

SIMD.cpp Clang warnings: comparison of integers of different signs

Categories

(Core :: JavaScript Engine, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla34

People

(Reporter: jandem, Assigned: bbouvier)

References

(Blocks 1 open bug)

Details

Attachments

(1 file)

Clang 3.4.1 with --enable-debug --enable-optimize complains: /Users/jan/dev/inbound/js/src/builtin/SIMD.cpp:689:36: warning: comparison of integers of different signs: 'int32_t' (aka 'int') and 'const uint32_t' (aka 'const unsigned int') [-Wsign-compare] if (maskArg < 0 || maskArg > MAX_MASK_VALUE) ~~~~~~~ ^ ~~~~~~~~~~~~~~ /Users/jan/dev/inbound/js/src/builtin/SIMD.cpp:704:36: warning: comparison of integers of different signs: 'int32_t' (aka 'int') and 'const uint32_t' (aka 'const unsigned int') [-Wsign-compare] if (maskArg < 0 || maskArg > MAX_MASK_VALUE) ~~~~~~~ ^ ~~~~~~~~~~~~~~
Flags: needinfo?(benj)
It should be a positive int32 in this case.
Attachment #8466147 - Flags: review?(jdemooij)
Flags: needinfo?(benj)
Comment on attachment 8466147 [details] [diff] [review] Silence Clang warning about signed/unsigned comparison in SIMD.cpp Review of attachment 8466147 [details] [diff] [review]: ----------------------------------------------------------------- Thanks :)
Attachment #8466147 - Flags: review?(jdemooij) → review+
Assignee: nobody → benj
Status: NEW → RESOLVED
Closed: 10 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla34
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: