[PATCH v2] ARM: arch/arm/kernel/signal.c: resolve set-but-not-used warning
From: Ethan Nelson-Moore
Date: Wed Jun 10 2026 - 00:53:51 EST
If neither CONFIG_IWMMXT nor CONFIG_VFP are enabled (which is the case,
for example, in rpc_defconfig), the variable "aux" is set but not used,
which generates a warning during W=1 builds. Resolve this issue by
marking the variable with the __maybe_unused attribute.
Signed-off-by: Ethan Nelson-Moore <enelsonmoore@xxxxxxxxx>
---
Changes from v1: Use __maybe_unused instead of introducing another layer
of ifdefs (suggested by Baruch Siach)
arch/arm/kernel/signal.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/arch/arm/kernel/signal.c b/arch/arm/kernel/signal.c
index 7be9188d83d9..a7e5e439a735 100644
--- a/arch/arm/kernel/signal.c
+++ b/arch/arm/kernel/signal.c
@@ -140,7 +140,7 @@ static int restore_vfp_context(char __user **auxp)
static int restore_sigframe(struct pt_regs *regs, struct sigframe __user *sf)
{
struct sigcontext context;
- char __user *aux;
+ char __user *aux __maybe_unused;
sigset_t set;
int err;
--
2.43.0