mirror of
https://github.com/cloud-hypervisor/cloud-hypervisor.git
synced 2024-11-04 19:11:11 +00:00
vmm: acpi: Fix clippy (needless_late_init) issue
warning: unneeded late initalization --> vmm/src/acpi.rs:525:5 | 525 | let mut prev_tbl_len: u64; | ^^^^^^^^^^^^^^^^^^^^^^^^^^ | = note: `#[warn(clippy::needless_late_init)]` on by default = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_late_init help: declare `prev_tbl_len` here | 552 | let mut prev_tbl_len: u64 = madt.len() as u64; | ~~~~~~~~~~~~~~~~~~~~~~~~~ warning: unneeded late initalization --> vmm/src/acpi.rs:526:5 | 526 | let mut prev_tbl_off: GuestAddress; | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_late_init help: declare `prev_tbl_off` here | 553 | let mut prev_tbl_off: GuestAddress = madt_offset; | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Signed-off-by: Rob Bradford <robert.bradford@intel.com>
This commit is contained in:
parent
221c1f1bdc
commit
8fa3864ae8
@ -522,8 +522,6 @@ pub fn create_acpi_tables(
|
||||
numa_nodes: &NumaNodes,
|
||||
) -> GuestAddress {
|
||||
let start_time = Instant::now();
|
||||
let mut prev_tbl_len: u64;
|
||||
let mut prev_tbl_off: GuestAddress;
|
||||
let rsdp_offset = arch::layout::RSDP_POINTER;
|
||||
let mut tables: Vec<u64> = Vec::new();
|
||||
|
||||
@ -549,8 +547,8 @@ pub fn create_acpi_tables(
|
||||
.write_slice(madt.as_slice(), madt_offset)
|
||||
.expect("Error writing MADT table");
|
||||
tables.push(madt_offset.0);
|
||||
prev_tbl_len = madt.len() as u64;
|
||||
prev_tbl_off = madt_offset;
|
||||
let mut prev_tbl_len = madt.len() as u64;
|
||||
let mut prev_tbl_off = madt_offset;
|
||||
|
||||
// PPTT
|
||||
#[cfg(target_arch = "aarch64")]
|
||||
|
Loading…
Reference in New Issue
Block a user