From 5286194102e74b86cca06b7a738f9392a1fb0dd1 Mon Sep 17 00:00:00 2001 From: Alexandre Courbot Date: Tue, 18 Oct 2022 11:17:20 +0900 Subject: [PATCH] virtio: video: allow dead code in the utils module The utils module contains code commonly used by backends, but not necessarily used by all. This can lead to compiler warnings about unused code depending on which backends are compiled in. Silence them by allowing dead code in that module only. BUG=None TEST=`cargo build --features "video-decoder,video-encoder,libvda"` does not emit any warning. Change-Id: Ia5cb28f84a2367f450c69eb505347cc4a0d95ba1 Reviewed-on: https://chromium-review.googlesource.com/c/crosvm/crosvm/+/3960215 Reviewed-by: Dennis Kempin Auto-Submit: Alexandre Courbot Commit-Queue: Dennis Kempin --- devices/src/virtio/video/utils.rs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/devices/src/virtio/video/utils.rs b/devices/src/virtio/video/utils.rs index b57bb1851b..45b7e3e11e 100644 --- a/devices/src/virtio/video/utils.rs +++ b/devices/src/virtio/video/utils.rs @@ -2,6 +2,9 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. +// Not all video backends make use of the tools in this module. +#![allow(dead_code)] + use std::collections::btree_map::Entry; use std::collections::BTreeMap; use std::collections::VecDeque;