Closed Bug 1562453 Opened 5 years ago Closed 5 years ago

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

Categories

(Core :: WebVR, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla69
Tracking Status
firefox69 --- fixed

People

(Reporter: Sylvestre, Assigned: kip)

References

(Blocks 1 open bug, Regression)

Details

(Keywords: regression)

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: 5 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla69
Assignee: nobody → kgilbert

Clearing NI

Flags: needinfo?(kgilbert)

thanks!

Has Regression Range: --- → yes
Keywords: regression
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: