mirror of
https://chromium.googlesource.com/crosvm/crosvm
synced 2024-11-25 05:03:05 +00:00
wl: silence unused code warnings
When wl-dmabuf is not enabled, rustc complains about unused imports and enum values. Add compiler directives to silence the warnings. BUG=None TEST='cargo build', 'emerge-nami crosvm' Change-Id: Ib39735d329f8aa835c0b5842b10bfe78d0e578d9 Signed-off-by: Daniel Verkamp <dverkamp@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/1327827
This commit is contained in:
parent
d32efefb7a
commit
6bfee45131
2 changed files with 3 additions and 0 deletions
|
@ -57,6 +57,7 @@ use data_model::VolatileMemoryError;
|
|||
use data_model::*;
|
||||
|
||||
use msg_socket::{MsgError, MsgReceiver, MsgSender, MsgSocket};
|
||||
#[cfg(feature = "wl-dmabuf")]
|
||||
use resources::GpuMemoryDesc;
|
||||
use sys_util::{
|
||||
pipe, round_up_to_page_size, Error, EventFd, FileFlags, GuestAddress, GuestMemory,
|
||||
|
@ -403,6 +404,7 @@ fn encode_resp(desc_mem: VolatileSlice, resp: WlResp) -> WlResult<u32> {
|
|||
}
|
||||
}
|
||||
|
||||
#[allow(dead_code)]
|
||||
#[derive(Debug)]
|
||||
enum WlError {
|
||||
NewAlloc(Error),
|
||||
|
|
|
@ -12,6 +12,7 @@ use gpu_buffer;
|
|||
use msg_socket::MsgOnSocket;
|
||||
use sys_util;
|
||||
|
||||
#[allow(dead_code)]
|
||||
#[derive(Debug)]
|
||||
pub enum GpuAllocatorError {
|
||||
OpenGpuBufferDevice,
|
||||
|
|
Loading…
Reference in a new issue