From 18996463911fdd7d2c3d7f8dfba8ad5afdb22cc4 Mon Sep 17 00:00:00 2001 From: Ruihan Li Date: Fri, 24 Jan 2025 17:43:16 +0800 Subject: [PATCH] Fix `#[allow(dead_code)]` in cpio-decoder --- kernel/libs/cpio-decoder/src/lib.rs | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/kernel/libs/cpio-decoder/src/lib.rs b/kernel/libs/cpio-decoder/src/lib.rs index 2e993af6..f958a3db 100644 --- a/kernel/libs/cpio-decoder/src/lib.rs +++ b/kernel/libs/cpio-decoder/src/lib.rs @@ -17,7 +17,6 @@ #![cfg_attr(not(test), no_std)] #![deny(unsafe_code)] -#![allow(dead_code)] extern crate alloc; @@ -323,7 +322,7 @@ struct Header { rdev_maj: [u8; 8], rdev_min: [u8; 8], name_size: [u8; 8], - chksum: [u8; 8], + _chksum: [u8; 8], } impl Header { @@ -348,7 +347,7 @@ impl Header { rdev_maj: <[u8; 8]>::try_from(&buf[78..86]).unwrap(), rdev_min: <[u8; 8]>::try_from(&buf[86..94]).unwrap(), name_size: <[u8; 8]>::try_from(&buf[94..102]).unwrap(), - chksum: <[u8; 8]>::try_from(&buf[102..110]).unwrap(), + _chksum: <[u8; 8]>::try_from(&buf[102..110]).unwrap(), }; if header.magic != MAGIC { return Err(Error::MagicError);