Repository navigation
build(obs-qsv11): mask in unsigned so MSVC keeps the constant intact (#2965) - #2969
Conversation
…2965) #2965 stated the NAL-mask conversion as `(uint8_t)~(3u << 5)`. The mask is right (0x9F), but the cast truncates a constant, and MSVC reports that as C4310, which the ratchet's warnings-as-errors turn makes fatal: plugins/obs-qsv11/obs-qsv11.c.h(1072,25): warning C4310: cast truncates constant value plugins/obs-qsv11/obs-qsv11.c.h(1072,25): error C2220: the following warning is treated as an error Masking in `unsigned` first keeps the expression's intent and leaves the cast a value that already fits, so no compiler sees a truncation. The byte written is unchanged. Refs #2625
|
Windows lane result for the dispatch on this branch — the C4310 site is gone.
No The other reds in that dispatch are master's, not this commit's diff (this PR touches one plugin file and no lane skips it here):
So #2969 should queue behind #2968 (both now have auto-merge on). |
|
Handed off to the coordinator. Windows x64 + arm64 green on the nightly dispatch above; auto-merge is on and the queue should take it after #2968 (same |
|
Windows verdict from
The other app lanes in that run are not this PR: PR CI on this branch: |
GREEN — MSVC confirmation
So The same run's Linux/macOS app lanes are red only because this branch predates master's #2968 ( Waiting on the PR's asan lane, then handing off. |
|
Green on Windows 🪟: The two failures on this branch are not this change:
The CEF job failed on the same run; it is a Chrome-release-data check, unrelated to this branch. |
master's Windows app lane is red on the ratchet slice #2965 merged: the NAL-mask cast states the right byte but truncates a constant, which MSVC turns into an error under warnings-as-errors.
RED — the Windows app lane
Scheduledonfix/2625-frontend-tools-scripts-conversions(#2968), run 40971591142, jobBuild 🧱 / Windows 🪟 (x64)(123789581762), on master217b3cf08+:The site is untouched by that PR; it is the cast #2965 added when it ratcheted
plugins/obs-qsv11.What changed
~(3u << 5)is0xFFFFFF9F; masking inunsignedfirst makes the cast operand0x9F, a value that already fitsuint8_t. The mask and the byte written are identical (bits 5-6 cleared), and the expression still says what it means.GREEN evidence
s &= (uint8_t)(0xFFu & ~(3u << 5)); s |= priority << 5;) compiles clean under GCC and Clang with-Wconversion -Wsign-conversion -Wfloat-conversion -Werror, and returns the same byte as before (0xFF → 0xBF with priority 1).clang-format --dry-run --Werroron the edited file: clean.-Wno-flag, no target change:plugins/obs-qsv11stays ratcheted.scheduled.yamlon the branch and will comment itsBuild 🧱 / Windows 🪟 (x64)result here.Tiers that do not apply: a mask constant in a plugin's NAL rewrite; no Rust unit, no C test, no protocol or runtime behaviour change.
Refs #2625, #2938