[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PULL 15/20] contrib/plugins/execlog: Fix shadowed declaration warning
From: |
Philippe Mathieu-Daudé |
Subject: |
[PULL 15/20] contrib/plugins/execlog: Fix shadowed declaration warning |
Date: |
Tue, 20 Aug 2024 00:51:11 +0200 |
From: Pierrick Bouvier <pierrick.bouvier@linaro.org>
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>
---
contrib/plugins/execlog.c | 4 ++--
1 file 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;
--
2.45.2
- [PULL 16/20] target/sparc: Restrict STQF to sparcv9, (continued)
- [PULL 16/20] target/sparc: Restrict STQF to sparcv9, Philippe Mathieu-Daudé, 2024/08/19
- [PULL 18/20] hw/i386/pc: Unify vmport=auto handling, Philippe Mathieu-Daudé, 2024/08/19
- [PULL 09/20] linux-user/mips: Do not try to use removed R5900 CPU, Philippe Mathieu-Daudé, 2024/08/19
- [PULL 20/20] crypto/tlscredspsk: Free username on finalize, Philippe Mathieu-Daudé, 2024/08/19
- [PULL 11/20] linux-user/mips: Select MIPS64R2-generic for Rel2 binaries, Philippe Mathieu-Daudé, 2024/08/19
- [PULL 13/20] tests/avocado: exec_command should not consume console output, Philippe Mathieu-Daudé, 2024/08/19
- [PULL 17/20] hw/ppc/Kconfig: Add missing SERIAL_ISA dependency to POWERNV machine, Philippe Mathieu-Daudé, 2024/08/19
- [PULL 06/20] target/mips: Load PTE as DATA, Philippe Mathieu-Daudé, 2024/08/19
- [PULL 10/20] linux-user/mips: Select Octeon68XX CPU for Octeon binaries, Philippe Mathieu-Daudé, 2024/08/19
- [PULL 12/20] linux-user/mips: Select Loongson CPU for Loongson binaries, Philippe Mathieu-Daudé, 2024/08/19
- [PULL 15/20] contrib/plugins/execlog: Fix shadowed declaration warning,
Philippe Mathieu-Daudé <=
- [PULL 19/20] hw/i386/pc: Ensure vmport prerequisites are fulfilled, Philippe Mathieu-Daudé, 2024/08/19
- [PULL 14/20] tests/avocado: Mark ppc_hv_tests.py as non-flaky after fixed console interaction, Philippe Mathieu-Daudé, 2024/08/19
- Re: [PULL 00/20] Misc fixes for 2024-08-20, Richard Henderson, 2024/08/20