diff --git a/devices/src/register_space/register.rs b/devices/src/register_space/register.rs index a61424397d..c5cbe7eb45 100644 --- a/devices/src/register_space/register.rs +++ b/devices/src/register_space/register.rs @@ -131,6 +131,7 @@ pub trait RegisterInterface: Send { /// Handle write. fn write(&self, _addr: RegisterOffset, _data: &[u8]) {} /// Reset this register to default value. + #[allow(dead_code)] fn reset(&self) {} } diff --git a/src/crosvm/cmdline.rs b/src/crosvm/cmdline.rs index a1be479d88..f74e198e58 100644 --- a/src/crosvm/cmdline.rs +++ b/src/crosvm/cmdline.rs @@ -646,6 +646,7 @@ pub struct UsbAttachCommand { arg_name = "BUS_ID:ADDR:BUS_NUM:DEV_NUM", from_str_fn(parse_bus_id_addr) )] + #[allow(dead_code)] pub addr: (u8, u8, u16, u16), #[argh(positional)] /// usb device path diff --git a/swap/tests/common/mod.rs b/swap/tests/common/mod.rs index 3d3afcd8ec..ec62bb9b4d 100644 --- a/swap/tests/common/mod.rs +++ b/swap/tests/common/mod.rs @@ -18,6 +18,7 @@ pub fn create_uffd_for_test() -> Userfaultfd { } pub struct SharedMemoryMapping { + #[allow(dead_code)] pub shm: SharedMemory, pub mmap: MemoryMapping, }