From a58b6b8e7641608d51a6dc38d0de1fe9666686ea Mon Sep 17 00:00:00 2001 From: enricobuehler Date: Thu, 18 Jun 2026 23:21:18 +0000 Subject: [PATCH] fix(windows-client): clear clippy -D warnings on MSVC The cfg(windows) code can't be lint-checked on the Linux dev box, so three -D warnings slipped through (caught by windows.yml; the FFI + shaders compiled fine): - gpu.rs: SetMultithreadProtected returns a must-use BOOL -> `let _ =`. - video.rs: drop the unused GpuFrame::ten_bit field (present keys off `hdr`; the value is still computed locally for the first-frame log). - present.rs: GpuView::frame is an RAII keep-alive (its Drop returns the decoder surface to the pool), never read -> #[allow(dead_code)]. Co-Authored-By: Claude Opus 4.8 (1M context) --- clients/windows/src/gpu.rs | 4 +++- clients/windows/src/present.rs | 2 ++ clients/windows/src/video.rs | 7 ++----- 3 files changed, 7 insertions(+), 6 deletions(-) diff --git a/clients/windows/src/gpu.rs b/clients/windows/src/gpu.rs index 3c76015..cd0ff74 100644 --- a/clients/windows/src/gpu.rs +++ b/clients/windows/src/gpu.rs @@ -97,7 +97,9 @@ fn create_device() -> Result { // FFmpeg also sets this during hwdevice init, but doing it up front keeps the // cross-thread `Send`/`Sync` sound from the moment the device exists. if let Ok(mt) = context.cast::() { - unsafe { mt.SetMultithreadProtected(true) }; + unsafe { + let _ = mt.SetMultithreadProtected(true); // returns the prior state; ignore + } } tracing::info!( driver = if hardware { diff --git a/clients/windows/src/present.rs b/clients/windows/src/present.rs index 1e5fb1d..953a206 100644 --- a/clients/windows/src/present.rs +++ b/clients/windows/src/present.rs @@ -82,6 +82,8 @@ float4 ps_p010(VSOut i) : SV_Target { struct GpuView { y: ID3D11ShaderResourceView, c: ID3D11ShaderResourceView, + /// Held only for its `Drop` (returns the decoder surface to the reuse pool) — never read. + #[allow(dead_code)] frame: GpuFrame, } diff --git a/clients/windows/src/video.rs b/clients/windows/src/video.rs index 4473377..18a5b67 100644 --- a/clients/windows/src/video.rs +++ b/clients/windows/src/video.rs @@ -91,11 +91,9 @@ pub struct GpuFrame { pub height: u32, /// Texture-array slice this frame occupies (`AVFrame::data[1]`). pub index: u32, - /// BT.2020 PQ HDR10 (P010, ST.2084) vs ordinary 8-bit BT.709 SDR (NV12). + /// BT.2020 PQ HDR10 (P010, ST.2084) vs ordinary 8-bit BT.709 SDR (NV12). The present path keys + /// SRV format + shader off this (the host couples 10-bit ⟺ HDR). pub hdr: bool, - /// 10-bit (P010, R16 planes) vs 8-bit (NV12, R8 planes) — kept for the first-frame log; the - /// present path keys colour/format off `hdr` (the host couples 10-bit ⟺ HDR). - pub ten_bit: bool, guard: D3d11FrameGuard, } @@ -472,7 +470,6 @@ impl D3d11vaDecoder { height: (*self.frame).height as u32, index: (*self.frame).data[1] as usize as u32, hdr, - ten_bit, guard: D3d11FrameGuard(cloned), }; log_layout_once(frame.width, frame.height, frame.index, hdr, ten_bit);