Skip to content

Clear pre-existing clippy -D warnings failures on Windows - #423

Open
RufanMelfor wants to merge 1 commit into
reco-project:mainfrom
RufanMelfor:fix/d3d11-stage-frame-unsafe
Open

Clear pre-existing clippy -D warnings failures on Windows#423
RufanMelfor wants to merge 1 commit into
reco-project:mainfrom
RufanMelfor:fix/d3d11-stage-frame-unsafe

Conversation

@RufanMelfor

Copy link
Copy Markdown
Contributor

cargo clippy --all-targets -- -D warnings currently fails on a clean
checkout of main on Windows — unrelated to any feature work, just found
incidentally while verifying another branch. Four issues:

  • interop/d3d11.rs: D3d11StagingPool::stage_frame dereferences a raw
    pointer without being unsafe fn (clippy::not_unsafe_ptr_arg_deref).
    Marked unsafe with a # Safety doc comment; updated the four call
    sites in frame_processing.rs accordingly.
  • session/mod.rs, detection_dispatch.rs: gpu_buf_info/
    cuda_nv12_frames/detect_and_update_director_gpu were cfg'd for
    linux+windows, but their only callers (the GpuResident zero-copy
    match arms) are Linux-only — narrowed the cfg gates to match, clearing
    dead-code warnings.
  • reco-io/smart_source.rs: WindowsDecodeState::Running carried
    join_handles/shutdown fields that were never read (matched away with
    .. everywhere) — the Windows D3D11VA decode threads exit via channel
    drop, not a join+shutdown flag like the Linux CUDA path (which has a
    real ordering hazard the flag actually guards). Removed the dead fields.
  • reco-autocam/lib.rs: is_10bit is only read by the tensorrt-native
    path and the Linux ORT-GPU path; gated the binding to match so an
    ort-only Windows build doesn't warn.

Verified: fmt/clippy --all-targets -- -D warnings fully clean on
Windows against current origin/main.

@github-actions

github-actions Bot commented Jul 16, 2026

Copy link
Copy Markdown

All contributors have signed the CLA. Thank you!
Posted by the CLA Assistant Lite bot.

…nings failures on Windows

cargo clippy --all-targets -- -D warnings currently fails on a clean
checkout of main, unrelated to any specific feature work:

- interop/d3d11.rs: D3d11StagingPool::stage_frame dereferences a raw
  pointer without being `unsafe fn` (clippy::not_unsafe_ptr_arg_deref).
  Marked unsafe with a `# Safety` doc; updated the four call sites in
  frame_processing.rs accordingly.
- session/mod.rs, detection_dispatch.rs: gpu_buf_info / cuda_nv12_frames
  / detect_and_update_director_gpu were cfg'd for linux+windows, but
  their only callers (the GpuResident zero-copy match arms) are
  Linux-only - narrowed the cfg gates to match, clearing dead_code.
- reco-io/smart_source.rs: WindowsDecodeState::Running carried
  join_handles/shutdown fields that were never read (matched away with
  `..` at every destructure site) - the Windows D3D11VA decode threads
  exit via channel drop, not a join+shutdown flag like the Linux CUDA
  path (which has a real ordering hazard); removed the dead fields and
  collapsed a nested if into a let-chain along the way.
- reco-autocam/lib.rs: is_10bit is only read by the tensorrt-native path
  and the Linux ORT-GPU path; gated the binding to match so an ort-only
  Windows build doesn't warn on it.

Verified: cargo fmt --check / clippy -p reco-core -p reco-io
-p reco-autocam --all-targets -- -D warnings / test --lib all clean on
Windows (the only 2 test failures are the pre-existing CUDA
hardware-gap tests, unrelated - no working CUDA runtime on this
machine).

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
@RufanMelfor

Copy link
Copy Markdown
Contributor Author

I have read the CLA Document and I hereby sign the CLA

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: In review

Development

Successfully merging this pull request may close these issues.

2 participants