From e920aebafef93383e4655bc554916868e806686c Mon Sep 17 00:00:00 2001 From: John Baldwin Date: Tue, 24 Apr 2018 17:31:20 +0000 Subject: [PATCH] Don't fetch the current instruction for faults on user "trap" instructions. The value of 'instr' was not used to handle the fault. Reported by: GCC's -Wunused-but-set-variable --- sys/mips/mips/trap.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/sys/mips/mips/trap.c b/sys/mips/mips/trap.c index 946232cf826a..83449862e463 100644 --- a/sys/mips/mips/trap.c +++ b/sys/mips/mips/trap.c @@ -875,15 +875,12 @@ trap(struct trapframe *trapframe) case T_TRAP + T_USER: { intptr_t va; - uint32_t instr; struct trapframe *locr0 = td->td_frame; /* compute address of trap instruction */ va = trapframe->pc; if (DELAYBRANCH(trapframe->cause)) va += sizeof(int); - /* read break instruction */ - instr = fuword32((caddr_t)va); if (DELAYBRANCH(trapframe->cause)) { /* Check BD bit */ locr0->pc = MipsEmulateBranch(locr0, trapframe->pc, 0,