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>
diff --git a/disk/src/disk.rs b/disk/src/disk.rs
index 3e13e05..9a8aaf6 100644
--- a/disk/src/disk.rs
+++ b/disk/src/disk.rs
@@ -238,7 +238,8 @@
 pub fn create_disk_file(
     raw_image: File,
     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>> {
     if max_nesting_depth == 0 {
         return Err(Error::MaxNestingDepthExceeded);