mirror of
https://chromium.googlesource.com/crosvm/crosvm
synced 2025-02-06 10:32:10 +00:00
disk: fix compile-time warning
Do not warn if the `image_path` parameter is unused, as it is only used if the composite-disk feature is enabled. BUG=b:221887571 TEST=cargo build Change-Id: I91f747152c0e5f4d75f7522a33d35f91890c6df6 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/crosvm/+/3531731 Reviewed-by: Keiichi Watanabe <keiichiw@chromium.org> Tested-by: kokoro <noreply+kokoro@google.com> Commit-Queue: Alexandre Courbot <acourbot@chromium.org>
This commit is contained in:
parent
dbd241847b
commit
1cca2c79c9
1 changed files with 2 additions and 1 deletions
|
@ -238,7 +238,8 @@ pub fn create_async_disk_file(raw_image: File) -> Result<Box<dyn ToAsyncDisk>> {
|
||||||
pub fn create_disk_file(
|
pub fn create_disk_file(
|
||||||
raw_image: File,
|
raw_image: File,
|
||||||
mut max_nesting_depth: u32,
|
mut max_nesting_depth: u32,
|
||||||
image_path: &Path,
|
// image_path is only used if the composite-disk feature is enabled.
|
||||||
|
#[allow(unused_variables)] image_path: &Path,
|
||||||
) -> Result<Box<dyn DiskFile>> {
|
) -> Result<Box<dyn DiskFile>> {
|
||||||
if max_nesting_depth == 0 {
|
if max_nesting_depth == 0 {
|
||||||
return Err(Error::MaxNestingDepthExceeded);
|
return Err(Error::MaxNestingDepthExceeded);
|
||||||
|
|
Loading…
Reference in a new issue