From 2e81ac463a260fecf7332a5b0376d6c835bcc845 Mon Sep 17 00:00:00 2001 From: Ruoqing He Date: Thu, 24 Jul 2025 05:01:34 +0000 Subject: [PATCH] dragonball: Allow unused to suppress warnings Some variables went unused if certain features are not enabled, use `#[allow(unused)]` to suppress those warnings at the time being. Signed-off-by: Ruoqing He --- src/dragonball/src/device_manager/mod.rs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/dragonball/src/device_manager/mod.rs b/src/dragonball/src/device_manager/mod.rs index 7d89dcb440..11cb35ddca 100644 --- a/src/dragonball/src/device_manager/mod.rs +++ b/src/dragonball/src/device_manager/mod.rs @@ -879,7 +879,7 @@ impl DeviceManager { /// Start all registered devices when booting the associated virtual machine. pub fn start_devices( &mut self, - vm_as: &GuestAddressSpaceImpl, + #[allow(unused)] vm_as: &GuestAddressSpaceImpl, ) -> std::result::Result<(), StartMicroVmError> { // It is safe because we don't expect poison lock. #[cfg(feature = "host-device")] @@ -899,6 +899,7 @@ impl DeviceManager { address_space: Option<&AddressSpace>, ) -> Result<()> { // create context for removing devices + #[allow(unused)] let mut ctx = DeviceOpContext::new( Some(epoll_mgr), self,