From 8d4c2cf1b930180509ea6ae492cb0354f54c5c19 Mon Sep 17 00:00:00 2001 From: Archana Shinde Date: Mon, 9 Jan 2023 15:32:39 -0800 Subject: [PATCH] kata-ctl: Allow certain constants to go unused The generic constants for cpu vendor and model may be superseded by architecture specific constants. Allow these to be marked as dead code to ignore warnings on architectures where they are overrided. Signed-off-by: Archana Shinde --- src/tools/kata-ctl/src/arch/aarch64/mod.rs | 2 ++ src/tools/kata-ctl/src/check.rs | 2 ++ 2 files changed, 4 insertions(+) diff --git a/src/tools/kata-ctl/src/arch/aarch64/mod.rs b/src/tools/kata-ctl/src/arch/aarch64/mod.rs index b86d1564f..7966123bd 100644 --- a/src/tools/kata-ctl/src/arch/aarch64/mod.rs +++ b/src/tools/kata-ctl/src/arch/aarch64/mod.rs @@ -12,7 +12,9 @@ mod arch_specific { use std::path::Path; const KVM_DEV: &str = "/dev/kvm"; + #[allow(dead_code)] pub const ARCH_CPU_VENDOR_FIELD: &str = "CPU implementer"; + #[allow(dead_code)] pub const ARCH_CPU_MODEL_FIELD: &str = "CPU architecture"; // List of check functions diff --git a/src/tools/kata-ctl/src/check.rs b/src/tools/kata-ctl/src/check.rs index a847be376..81b9b83a7 100644 --- a/src/tools/kata-ctl/src/check.rs +++ b/src/tools/kata-ctl/src/check.rs @@ -23,7 +23,9 @@ const JSON_TYPE: &str = "application/json"; const USER_AGT: &str = "kata"; +#[allow(dead_code)] pub const GENERIC_CPU_VENDOR_FIELD: &str = "vendor_id"; +#[allow(dead_code)] pub const GENERIC_CPU_MODEL_FIELD: &str = "model name"; #[allow(dead_code)]