diff options
author | Philippe Mathieu-Daudé <philmd@linaro.org> | 2023-09-04 18:12:13 +0200 |
---|---|---|
committer | Markus Armbruster <armbru@redhat.com> | 2023-09-29 10:07:14 +0200 |
commit | 9a239c6eae68e0bfb989f9ebb2907e04f98fde99 (patch) | |
tree | 77e0a168088d9ff7009ada52c42f2d489f0b1404 /accel/tcg | |
parent | bb71846325e23d884ca4ff1bcc95aaead0131a5a (diff) |
tcg: Clean up local variable shadowing
Fix:
tcg/tcg.c:2551:27: error: declaration shadows a local variable [-Werror,-Wshadow]
MemOp op = get_memop(oi);
^
tcg/tcg.c:2437:12: note: previous declaration is here
TCGOp *op;
^
accel/tcg/tb-maint.c:245:18: error: declaration shadows a local variable [-Werror,-Wshadow]
for (int i = 0; i < V_L2_SIZE; i++) {
^
accel/tcg/tb-maint.c:210:9: note: previous declaration is here
int i;
^
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Message-ID: <20230904161235.84651-2-philmd@linaro.org>
Signed-off-by: Markus Armbruster <armbru@redhat.com>
Diffstat (limited to 'accel/tcg')
-rw-r--r-- | accel/tcg/tb-maint.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/accel/tcg/tb-maint.c b/accel/tcg/tb-maint.c index 32ae8af61c..8c71cebabd 100644 --- a/accel/tcg/tb-maint.c +++ b/accel/tcg/tb-maint.c @@ -207,13 +207,12 @@ static PageDesc *page_find_alloc(tb_page_addr_t index, bool alloc) { PageDesc *pd; void **lp; - int i; /* Level 1. Always allocated. */ lp = l1_map + ((index >> v_l1_shift) & (v_l1_size - 1)); /* Level 2..N-1. */ - for (i = v_l2_levels; i > 0; i--) { + for (int i = v_l2_levels; i > 0; i--) { void **p = qatomic_rcu_read(lp); if (p == NULL) { |