mirror of
https://github.com/cloud-hypervisor/cloud-hypervisor.git
synced 2024-12-22 13:45:20 +00:00
block: vhdx: "signature" field is unused
Prefix field with an _ to indicate that this is intentionally unused. This resolved a nightly compiler check issue due to the unusued field. Signed-off-by: Rob Bradford <rbradford@rivosinc.com>
This commit is contained in:
parent
fd81a23fcc
commit
b15e5923ab
@ -90,7 +90,7 @@ pub type Result<T> = std::result::Result<T, VhdxHeaderError>;
|
|||||||
|
|
||||||
#[derive(Clone, Debug)]
|
#[derive(Clone, Debug)]
|
||||||
pub struct FileTypeIdentifier {
|
pub struct FileTypeIdentifier {
|
||||||
pub signature: u64,
|
pub _signature: u64,
|
||||||
}
|
}
|
||||||
|
|
||||||
impl FileTypeIdentifier {
|
impl FileTypeIdentifier {
|
||||||
@ -98,14 +98,14 @@ impl FileTypeIdentifier {
|
|||||||
pub fn new(f: &mut File) -> Result<FileTypeIdentifier> {
|
pub fn new(f: &mut File) -> Result<FileTypeIdentifier> {
|
||||||
f.seek(SeekFrom::Start(FILE_START))
|
f.seek(SeekFrom::Start(FILE_START))
|
||||||
.map_err(VhdxHeaderError::SeekFileTypeIdentifier)?;
|
.map_err(VhdxHeaderError::SeekFileTypeIdentifier)?;
|
||||||
let signature = f
|
let _signature = f
|
||||||
.read_u64::<LittleEndian>()
|
.read_u64::<LittleEndian>()
|
||||||
.map_err(VhdxHeaderError::ReadFileTypeIdentifier)?;
|
.map_err(VhdxHeaderError::ReadFileTypeIdentifier)?;
|
||||||
if signature != VHDX_SIGN {
|
if _signature != VHDX_SIGN {
|
||||||
return Err(VhdxHeaderError::InvalidVHDXSign);
|
return Err(VhdxHeaderError::InvalidVHDXSign);
|
||||||
}
|
}
|
||||||
|
|
||||||
Ok(FileTypeIdentifier { signature })
|
Ok(FileTypeIdentifier { _signature })
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user