From adda25dbf9eb9404c32a444533e1fe80e57d27dc Mon Sep 17 00:00:00 2001 From: Jan Samek Date: Sat, 28 Aug 2021 22:06:32 +0200 Subject: [PATCH] misc.c: variadic params for cpuid command on x86 only As the cpuid command is only compiled on x86, make the creation of variadic parameters structure also x86-specific. This prevents the warning for unused variable `cpuid_params` (which gets escalated to an error due to `-Werror`). Signed-off-by: Jan Samek --- misc.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/misc.c b/misc.c index 5e5ca71..965cc07 100644 --- a/misc.c +++ b/misc.c @@ -258,7 +258,10 @@ runon(int argc, const char *argv[], const struct cmd_info *info) return -1; } +#ifdef ARCH_X86 MAKE_PREREQ_PARAMS_VAR_ARGS(cpuid_params, 3, 4, " [index]", 0); +#endif /* ARCH_X86 */ + MAKE_PREREQ_PARAMS_VAR_ARGS(runon_params, 3, INT_MAX, " [args]", 0); static const struct cmd_info misc_cmds[] = {