diff --git a/crates/punktfunk-host/src/capture/linux/mod.rs b/crates/punktfunk-host/src/capture/linux/mod.rs index e4add236..d094ee74 100644 --- a/crates/punktfunk-host/src/capture/linux/mod.rs +++ b/crates/punktfunk-host/src/capture/linux/mod.rs @@ -1062,6 +1062,8 @@ mod pipewire { // requested). The resulting pointer is in bounds and aligned for `spa_meta_bitmap`. let bmp = unsafe { (cur as *const u8).add(bmp_off as usize) as *const spa::sys::spa_meta_bitmap }; + // SAFETY: `bmp` is the in-bounds, aligned `spa_meta_bitmap` pointer computed just above; the + // producer fully initialized this header, so reading its scalar fields is sound. let (vfmt, bw, bh, stride, pix_off) = unsafe { ( (*bmp).format, diff --git a/crates/punktfunk-host/src/linux/zerocopy/cuda.rs b/crates/punktfunk-host/src/linux/zerocopy/cuda.rs index ea9eb467..0a24c58c 100644 --- a/crates/punktfunk-host/src/linux/zerocopy/cuda.rs +++ b/crates/punktfunk-host/src/linux/zerocopy/cuda.rs @@ -703,10 +703,10 @@ impl CursorBlend { "cuModuleLoadData(cursor_blend)", )?; } - // SAFETY: `module` loaded above; each name is a valid NUL-terminated symbol present in the - // module (verified in the .ptx `.entry` list); `&mut f` is a live out-param. let getf = |name: &CStr| -> Result { let mut f: CUfunction = std::ptr::null_mut(); + // SAFETY: `module` loaded above; each name is a valid NUL-terminated symbol present in + // the module (verified in the .ptx `.entry` list); `&mut f` is a live out-param. unsafe { ck( cuModuleGetFunction(&mut f, module, name.as_ptr()), @@ -759,6 +759,7 @@ impl CursorBlend { } /// Blend into a packed 4-byte (NVENC ARGB) owned surface at `(ox,oy)`. + #[allow(clippy::too_many_arguments)] // surface geometry + cursor size + offset — a struct would just be unpacked at the call pub fn blend_argb( &self, surf: CUdeviceptr, @@ -789,6 +790,7 @@ impl CursorBlend { } /// Blend into an owned planar YUV444 surface (3 stacked full-res planes) at `(ox,oy)`. + #[allow(clippy::too_many_arguments)] // surface geometry + cursor size + offset — a struct would just be unpacked at the call pub fn blend_yuv444( &self, base: CUdeviceptr, @@ -819,6 +821,7 @@ impl CursorBlend { } /// Blend into an owned NV12 surface (Y plane at `base`, interleaved UV at `base + pitch*h`). + #[allow(clippy::too_many_arguments)] // surface geometry + cursor size + offset — a struct would just be unpacked at the call pub fn blend_nv12( &self, base: CUdeviceptr,