mirror of
https://github.com/kata-containers/kata-containers.git
synced 2026-07-13 03:26:54 +00:00
Fix `repr_packed_without_abi` clippy warning as suggested by rust
1.85.1.
```console
error: item uses `packed` representation without ABI-qualification
--> dbs_pci/src/msi.rs:468:1
|
466 | #[repr(packed)]
| ------ `packed` representation set here
467 | #[derive(Clone, Copy, Default, PartialEq)]
468 | / pub struct MsiState {
469 | | msg_ctl: u16,
470 | | msg_addr_lo: u32,
471 | | msg_addr_hi: u32,
472 | | msg_data: u16,
473 | | mask_bits: u32,
474 | | }
| |_^
|
= warning: unqualified `#[repr(packed)]` defaults to `#[repr(Rust, packed)]`, which has no stable ABI
= help: qualify the desired ABI explicity via `#[repr(C, packed)]` or `#[repr(Rust, packed)]`
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#repr_packed_without_abi
= note: `-D clippy::repr-packed-without-abi` implied by `-D warnings`
= help: to override `-D warnings` add `#[allow(clippy::repr_packed_without_abi)]`
```
Signed-off-by: Ruoqing He <heruoqing@iscas.ac.cn>
dbs-acpi
dbs-acpi provides ACPI data structures for VMM to emulate ACPI behavior.
Acknowledgement
Part of the code is derived from the Cloud Hypervisor project.
License
This project is licensed under Apache License, Version 2.0.