Closed Bug 1757253 Opened 3 years ago Closed 3 years ago

Always false comparison in StreamLoader::OnStartRequest()

Categories

(Core :: CSS Parsing and Computation, defect)

defect

Tracking

()

RESOLVED FIXED
99 Branch
Tracking Status
firefox-esr91 --- wontfix
firefox97 --- wontfix
firefox98 --- wontfix
firefox99 --- fixed

People

(Reporter: mccr8, Assigned: nika)

References

(Regression)

Details

(Keywords: regression)

Attachments

(1 file)

[...]/layout/style/StreamLoader.cpp:46:28: warning: result of comparison 'uint64_t' (aka 'unsigned long long') > 18446744073709551615 is always false [-Wtautological-type-limit-compare]

I noticed this warning passing by when I did a local build. This line of code was changed in bug 1741665. I think it is a regression because that bug changed nsACString::size_type from uint32_t to size_t.

The actual check is: uint64_t(length) > std::numeric_limits<nsACString::size_type>::max().

I guess this check isn't trivial on 32-bit builds...

This is just a compiler warning in 64 bit builds, so there's no user impact.

Severity: -- → N/A
Type: task → defect
Has Regression Range: --- → yes

:nika, since you are the author of the regressor, bug 1741665, could you take a look?
For more information, please visit auto_nag documentation.

Flags: needinfo?(nika)
Assignee: nobody → nika
Status: NEW → ASSIGNED
Flags: needinfo?(nika)
Pushed by nlayzell@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/42a0797b0370 Use CheckedInt to avoid unnecessary warning in 64-bit builds, r=emilio
Status: ASSIGNED → RESOLVED
Closed: 3 years ago
Resolution: --- → FIXED
Target Milestone: --- → 99 Branch
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: