Closed
Bug 2054240
Opened 3 months ago
Closed 3 months ago
Fix bugprone-fold-init-type warnings in WebMDemuxer::GetNextPacket
Categories
(Core :: Audio/Video, task)
Core
Audio/Video
Tracking
()
RESOLVED
FIXED
154 Branch
| Tracking | Status | |
|---|---|---|
| firefox154 | --- | fixed |
People
(Reporter: Sylvestre, Assigned: Sylvestre)
References
(Blocks 1 open bug)
Details
Attachments
(1 external file)
clang-tidy reports two bugprone-fold-init-type warnings in WebMDemuxer.cpp. The two std::accumulate calls in the MOZ_ASSERT verifying crypto sample sizes are initialized with 0 (an int) while folding over uint32_t elements of mPlainSizes and mEncryptedSizes, which folds unsigned int into int and risks loss of precision.
Fixed by using size_t{0} as the init value for both accumulations, which also matches the size_t type of length being compared against and removes the need for the explicit (size_t) cast.
| Assignee | ||
Comment 1•3 months ago
|
||
Pushed by sledru@mozilla.com:
https://github.com/mozilla-firefox/firefox/commit/62c2a37fb6e8
https://hg.mozilla.org/integration/autoland/rev/02435c9d04ae
Fix bugprone-fold-init-type warnings in WebMDemuxer::GetNextPacket r=media-playback-reviewers,chunmin
Comment 3•3 months ago
|
||
| bugherder | ||
Status: NEW → RESOLVED
Closed: 3 months ago
status-firefox154:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → 154 Branch
Updated•3 months ago
|
QA Whiteboard: [qa-triage-done-c155/b154]
You need to log in
before you can comment on or make changes to this bug.
Description
•