mirror of
https://github.com/kata-containers/kata-containers.git
synced 2025-09-09 12:49:12 +00:00
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:
@@ -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,
|
||||||
|
Reference in New Issue
Block a user