[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH 04/11] target/m68k: Clean up local variable shadowing
From: |
Philippe Mathieu-Daudé |
Subject: |
[PATCH 04/11] target/m68k: Clean up local variable shadowing |
Date: |
Fri, 1 Sep 2023 00:55:59 +0200 |
Fix:
target/m68k/translate.c:828:18: error: declaration shadows a local variable
[-Werror,-Wshadow]
TCGv tmp = tcg_temp_new();
^
target/m68k/translate.c:801:15: note: previous declaration is here
TCGv reg, tmp, result;
^
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
---
target/m68k/translate.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/target/m68k/translate.c b/target/m68k/translate.c
index 15b3701b8f..f69ae0e3b0 100644
--- a/target/m68k/translate.c
+++ b/target/m68k/translate.c
@@ -825,7 +825,7 @@ static TCGv gen_ea_mode(CPUM68KState *env, DisasContext *s,
int mode, int reg0,
reg = get_areg(s, reg0);
result = gen_ldst(s, opsize, reg, val, what, index);
if (what == EA_STORE || !addrp) {
- TCGv tmp = tcg_temp_new();
+ tmp = tcg_temp_new();
if (reg0 == 7 && opsize == OS_BYTE &&
m68k_feature(s->env, M68K_FEATURE_M68K)) {
tcg_gen_addi_i32(tmp, reg, 2);
--
2.41.0
- [PATCH 00/11] (few more) Steps towards enabling -Wshadow, Philippe Mathieu-Daudé, 2023/08/31
- [PATCH 01/11] tcg: Clean up local variable shadowing, Philippe Mathieu-Daudé, 2023/08/31
- [PATCH 02/11] target/arm: Clean up local variable shadowing, Philippe Mathieu-Daudé, 2023/08/31
- [PATCH 03/11] target/mips: Clean up local variable shadowing, Philippe Mathieu-Daudé, 2023/08/31
- [PATCH 04/11] target/m68k: Clean up local variable shadowing,
Philippe Mathieu-Daudé <=
- [PATCH 05/11] hw/arm/virt: Clean up local variable shadowing, Philippe Mathieu-Daudé, 2023/08/31
- [PATCH 06/11] hw/arm/allwinner: Clean up local variable shadowing, Philippe Mathieu-Daudé, 2023/08/31
- [PATCH 07/11] hw/arm/aspeed: Clean up local variable shadowing, Philippe Mathieu-Daudé, 2023/08/31
- [PATCH 08/11] hw/m68k: Clean up local variable shadowing, Philippe Mathieu-Daudé, 2023/08/31
- [PATCH 09/11] hw/ide/ahci: Clean up local variable shadowing, Philippe Mathieu-Daudé, 2023/08/31
- [PATCH 10/11] net/eth: Clean up local variable shadowing, Philippe Mathieu-Daudé, 2023/08/31
- [PATCH 11/11] sysemu/device_tree: Clean up local variable shadowing, Philippe Mathieu-Daudé, 2023/08/31