Closed Bug 1562453 Opened 4 months ago Closed 4 months ago

[-Werror,-Wtautological-type-limit-compare] Useless test - "is always false"

Categories

(Core :: WebVR, defect)

defect
Not set

Tracking

()

RESOLVED FIXED
mozilla69
Tracking Status
firefox69 --- fixed

People

(Reporter: Sylvestre, Assigned: kip)

References

(Blocks 1 open bug, Regression)

Details

Attachments

(1 file)

The CI with -Werror is failing since bug 1466702 landed.
The warning is:

/var/lib/jenkins/workspace/firefox-clang-lld-last/dom/vr/VRServiceTest.cpp:635:17: error: result of comparison 'uint32_t' (aka 'unsigned int') > 4294967295 is always false [-Werror,-Wtautological-type-limit-compare]
  if (aDuration > 0xffffffff) {
      ~~~~~~~~~ ^ ~~~~~~~~~~
/var/lib/jenkins/workspace/firefox-clang-lld-last/dom/vr/VRServiceTest.cpp:644:17: error: result of comparison 'uint32_t' (aka 'unsigned int') > 4294967295 is always false [-Werror,-Wtautological-type-limit-compare]
  if (aDuration > 0xffffffff) {
      ~~~~~~~~~ ^ ~~~~~~~~~~

Kip, could you please have a look? Thanks

Flags: needinfo?(kgilbert)

There were a couple of checks to clamp arguments in VRServiceTest.cpp.
The final landed patch reduced the arguments to 32-bit unsigned
integers, making these checks redundant.

Pushed by kgilbert@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/6f1b37c88772
Remove uint32 clamping tests, which have no effect r=thomasmo
Status: NEW → RESOLVED
Closed: 4 months ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla69
Assignee: nobody → kgilbert

Clearing NI

Flags: needinfo?(kgilbert)

thanks!

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