From 1f6bc6240faa126048c13ad20427b250d9cba235 Mon Sep 17 00:00:00 2001 From: "Matthew D. Steele" Date: Sat, 8 Jan 2022 16:29:42 -0500 Subject: [PATCH] Move local variable declaration to top of block --- src/sim65/paravirt.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/sim65/paravirt.c b/src/sim65/paravirt.c index 7da683f1d..ba3a76461 100644 --- a/src/sim65/paravirt.c +++ b/src/sim65/paravirt.c @@ -317,6 +317,8 @@ void ParaVirtInit (unsigned aArgStart, unsigned char aSPAddr) void ParaVirtHooks (CPURegs* Regs) /* Potentially execute paravirtualization hooks */ { + unsigned lo; + /* Check for paravirtualization address range */ if (Regs->PC < PARAVIRT_BASE || Regs->PC >= PARAVIRT_BASE + sizeof (Hooks) / sizeof (Hooks[0])) { @@ -327,6 +329,6 @@ void ParaVirtHooks (CPURegs* Regs) Hooks[Regs->PC - PARAVIRT_BASE] (Regs); /* Simulate RTS */ - unsigned lo = Pop(Regs); + lo = Pop(Regs); Regs->PC = lo + (Pop(Regs) << 8) + 1; }