diff options
author | Pierrick Bouvier <pierrick.bouvier@linaro.org> | 2024-08-14 16:36:40 -0700 |
---|---|---|
committer | Philippe Mathieu-Daudé <philmd@linaro.org> | 2024-08-20 00:49:14 +0200 |
commit | 47f06fb4c878a6e08b6fd19b7798d32b1e041124 (patch) | |
tree | 4680761ba982b99cb7a1d940123fa46996c5caed | |
parent | 8e540bbe4567745dab310d620aefd7163e74cd93 (diff) |
contrib/plugins/execlog: Fix shadowed declaration warning
Found on debian stable.
../contrib/plugins/execlog.c: In function ‘vcpu_tb_trans’:
../contrib/plugins/execlog.c:236:22: error: declaration of ‘n’ shadows a previous local [-Werror=shadow=local]
236 | for (int n = 0; n < all_reg_names->len; n++) {
| ^
../contrib/plugins/execlog.c:184:12: note: shadowed declaration is here
184 | size_t n = qemu_plugin_tb_n_insns(tb);
|
Signed-off-by: Pierrick Bouvier <pierrick.bouvier@linaro.org>
Reviewed-by: Thomas Huth <thuth@redhat.com>
Message-ID: <20240814233645.944327-2-pierrick.bouvier@linaro.org>
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
-rw-r--r-- | contrib/plugins/execlog.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/contrib/plugins/execlog.c b/contrib/plugins/execlog.c index 1c1601cc0b..d67d010761 100644 --- a/contrib/plugins/execlog.c +++ b/contrib/plugins/execlog.c @@ -181,8 +181,8 @@ static void vcpu_tb_trans(qemu_plugin_id_t id, struct qemu_plugin_tb *tb) bool check_regs_this = rmatches; bool check_regs_next = false; - size_t n = qemu_plugin_tb_n_insns(tb); - for (size_t i = 0; i < n; i++) { + size_t n_insns = qemu_plugin_tb_n_insns(tb); + for (size_t i = 0; i < n_insns; i++) { char *insn_disas; uint64_t insn_vaddr; |