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 <heruoqing@iscas.ac.cn>
This commit is contained in:
Ruoqing He
2025-07-24 05:01:34 +00:00
parent 5f7da1ccaa
commit 2e81ac463a

View File

@@ -879,7 +879,7 @@ impl DeviceManager {
/// Start all registered devices when booting the associated virtual machine. /// Start all registered devices when booting the associated virtual machine.
pub fn start_devices( pub fn start_devices(
&mut self, &mut self,
vm_as: &GuestAddressSpaceImpl, #[allow(unused)] vm_as: &GuestAddressSpaceImpl,
) -> std::result::Result<(), StartMicroVmError> { ) -> std::result::Result<(), StartMicroVmError> {
// It is safe because we don't expect poison lock. // It is safe because we don't expect poison lock.
#[cfg(feature = "host-device")] #[cfg(feature = "host-device")]
@@ -899,6 +899,7 @@ impl DeviceManager {
address_space: Option<&AddressSpace>, address_space: Option<&AddressSpace>,
) -> Result<()> { ) -> Result<()> {
// create context for removing devices // create context for removing devices
#[allow(unused)]
let mut ctx = DeviceOpContext::new( let mut ctx = DeviceOpContext::new(
Some(epoll_mgr), Some(epoll_mgr),
self, self,