mirror of
https://github.com/asterinas/asterinas.git
synced 2025-06-10 05:46:48 +00:00
Fix #[allow(dead_code)]
in cpio-decoder
This commit is contained in:
parent
09ef817b4e
commit
1899646391
@ -17,7 +17,6 @@
|
|||||||
|
|
||||||
#![cfg_attr(not(test), no_std)]
|
#![cfg_attr(not(test), no_std)]
|
||||||
#![deny(unsafe_code)]
|
#![deny(unsafe_code)]
|
||||||
#![allow(dead_code)]
|
|
||||||
|
|
||||||
extern crate alloc;
|
extern crate alloc;
|
||||||
|
|
||||||
@ -323,7 +322,7 @@ struct Header {
|
|||||||
rdev_maj: [u8; 8],
|
rdev_maj: [u8; 8],
|
||||||
rdev_min: [u8; 8],
|
rdev_min: [u8; 8],
|
||||||
name_size: [u8; 8],
|
name_size: [u8; 8],
|
||||||
chksum: [u8; 8],
|
_chksum: [u8; 8],
|
||||||
}
|
}
|
||||||
|
|
||||||
impl Header {
|
impl Header {
|
||||||
@ -348,7 +347,7 @@ impl Header {
|
|||||||
rdev_maj: <[u8; 8]>::try_from(&buf[78..86]).unwrap(),
|
rdev_maj: <[u8; 8]>::try_from(&buf[78..86]).unwrap(),
|
||||||
rdev_min: <[u8; 8]>::try_from(&buf[86..94]).unwrap(),
|
rdev_min: <[u8; 8]>::try_from(&buf[86..94]).unwrap(),
|
||||||
name_size: <[u8; 8]>::try_from(&buf[94..102]).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 {
|
if header.magic != MAGIC {
|
||||||
return Err(Error::MagicError);
|
return Err(Error::MagicError);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user