aboutsummaryrefslogtreecommitdiff
path: root/target/m68k/translate.c
diff options
context:
space:
mode:
authorPhilippe Mathieu-Daudé <philmd@linaro.org>2023-09-04 18:12:15 +0200
committerMarkus Armbruster <armbru@redhat.com>2023-09-29 10:07:14 +0200
commit5a3d2c3562a9b35443fb4121ba6efff9d6cdbb91 (patch)
tree15ca809f118b5692a0ec7d1aea45b36287173155 /target/m68k/translate.c
parentd54deb2a0723d696bc4e95265d6ccb4236cb0cf4 (diff)
downloadqemu-5a3d2c3562a9b35443fb4121ba6efff9d6cdbb91.zip
qemu-5a3d2c3562a9b35443fb4121ba6efff9d6cdbb91.tar.gz
qemu-5a3d2c3562a9b35443fb4121ba6efff9d6cdbb91.tar.bz2
target/arm/hvf: Clean up local variable shadowing
Per Peter Maydell analysis [*]: The hvf_vcpu_exec() function is not documented, but in practice its caller expects it to return either EXCP_DEBUG (for "this was a guest debug exception you need to deal with") or something else (presumably the intention being 0 for OK). The hvf_sysreg_read() and hvf_sysreg_write() functions are also not documented, but they return 0 on success, or 1 for a completely unrecognized sysreg where we've raised the UNDEF exception (but not if we raised an UNDEF exception for an unrecognized GIC sysreg -- I think this is a bug). We use this return value to decide whether we need to advance the PC past the insn or not. It's not the same as the return value we want to return from hvf_vcpu_exec(). Retain the variable as locally scoped but give it a name that doesn't clash with the other function-scoped variable. This fixes: target/arm/hvf/hvf.c:1936:13: error: declaration shadows a local variable [-Werror,-Wshadow] int ret = 0; ^ target/arm/hvf/hvf.c:1807:9: note: previous declaration is here int ret; ^ [*] https://lore.kernel.org/qemu-devel/CAFEAcA_e+fU6JKtS+W63wr9cCJ6btu_hT_ydZWOwC0kBkDYYYQ@mail.gmail.com/ Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org> Message-ID: <20230904161235.84651-4-philmd@linaro.org> Reviewed-by: Peter Maydell <peter.maydell@linaro.org> Signed-off-by: Markus Armbruster <armbru@redhat.com>
Diffstat (limited to 'target/m68k/translate.c')
0 files changed, 0 insertions, 0 deletions