From 2923d1b10b1b055e41c914af3a09ca20a1f6c2a7 Mon Sep 17 00:00:00 2001 From: xtqqczze <45661989+xtqqczze@users.noreply.github.com> Date: Mon, 23 Feb 2026 14:49:35 +0000 Subject: [PATCH] uucore: use transmute instead of raw pointers --- src/uucore/src/lib/features/fsext.rs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/uucore/src/lib/features/fsext.rs b/src/uucore/src/lib/features/fsext.rs index 173fe918f..02dcbeb24 100644 --- a/src/uucore/src/lib/features/fsext.rs +++ b/src/uucore/src/lib/features/fsext.rs @@ -853,7 +853,8 @@ impl FsMeta for StatFs { fn fsid(&self) -> u64 { // Use type inference to determine the type of f_fsid // (libc::__fsid_t on Android, libc::fsid_t on other platforms) - let f_fsid: &[u32; 2] = unsafe { &*(&raw const self.f_fsid).cast() }; + let f_fsid = self.f_fsid; + let f_fsid: [u32; 2] = unsafe { mem::transmute(f_fsid) }; ((u64::from(f_fsid[0])) << 32) | u64::from(f_fsid[1]) } #[cfg(not(any(