mirror of
https://chromium.googlesource.com/crosvm/crosvm
synced 2025-02-10 12:09:31 +00:00
audio: Fix the unreachable pattern warning with audio_cras
Builds with audio_cras feature gets the following warning warning: unreachable pattern --> src/crosvm/sys/unix/device_helpers.rs:443:9 | 443 | _ => unreachable!(), | ^ | = note: `#[warn(unreachable_patterns)]` on by default This is because the enum is fully matched when audio_cras is enabled. Make the unreachable conditional based on the audio_cras feature. TEST=None BUG=None Change-Id: I68f9d7e4571e043ba81ceef62ced075415398802 Reviewed-on: https://chromium-review.googlesource.com/c/crosvm/crosvm/+/3911098 Commit-Queue: Vineeth Pillai <vineethrp@google.com> Reviewed-by: Dennis Kempin <denniskempin@google.com>
This commit is contained in:
parent
ea55d0fecd
commit
ea67d8ba10
1 changed files with 1 additions and 0 deletions
|
@ -439,6 +439,7 @@ pub fn create_virtio_snd_device(
|
||||||
Backend::NULL => "snd_null_device",
|
Backend::NULL => "snd_null_device",
|
||||||
#[cfg(feature = "audio_cras")]
|
#[cfg(feature = "audio_cras")]
|
||||||
Backend::Sys(virtio::snd::sys::StreamSourceBackend::CRAS) => "snd_cras_device",
|
Backend::Sys(virtio::snd::sys::StreamSourceBackend::CRAS) => "snd_cras_device",
|
||||||
|
#[cfg(not(feature = "audio_cras"))]
|
||||||
_ => unreachable!(),
|
_ => unreachable!(),
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue