[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH v2 02/22] target/arm/tcg: Clean up local variable shadowing
From: |
Peter Maydell |
Subject: |
Re: [PATCH v2 02/22] target/arm/tcg: Clean up local variable shadowing |
Date: |
Fri, 8 Sep 2023 13:25:39 +0100 |
On Mon, 4 Sept 2023 at 17:12, Philippe Mathieu-Daudé <philmd@linaro.org> wrote:
>
> Fix:
>
> target/arm/tcg/translate-m-nocp.c: In function ‘gen_M_fp_sysreg_read’:
> target/arm/tcg/translate-m-nocp.c:509:18: warning: declaration of ‘tmp’
> shadows a previous local [-Wshadow=compatible-local]
> 509 | TCGv_i32 tmp = load_cpu_field(v7m.fpdscr[M_REG_NS]);
> | ^~~
> target/arm/tcg/translate-m-nocp.c:433:14: note: shadowed declaration is here
> 433 | TCGv_i32 tmp;
> | ^~~
> ---
>
> target/arm/tcg/mve_helper.c: In function ‘helper_mve_vqshlsb’:
> target/arm/tcg/mve_helper.c:1259:19: warning: declaration of ‘r’ shadows a
> previous local [-Wshadow=compatible-local]
> 1259 | typeof(N) r = FN(N, (int8_t)(M), sizeof(N) * 8, ROUND,
> &su32); \
> | ^
> target/arm/tcg/mve_helper.c:1267:5: note: in expansion of macro
> ‘WRAP_QRSHL_HELPER’
> 1267 | WRAP_QRSHL_HELPER(do_sqrshl_bhs, N, M, false, satp)
> | ^~~~~~~~~~~~~~~~~
> target/arm/tcg/mve_helper.c:927:22: note: in expansion of macro
> ‘DO_SQSHL_OP’
> 927 | TYPE r = FN(n[H##ESIZE(e)], m[H##ESIZE(e)], &sat);
> \
> | ^~
> target/arm/tcg/mve_helper.c:945:5: note: in expansion of macro ‘DO_2OP_SAT’
> 945 | DO_2OP_SAT(OP##b, 1, int8_t, FN) \
> | ^~~~~~~~~~
> target/arm/tcg/mve_helper.c:1277:1: note: in expansion of macro
> ‘DO_2OP_SAT_S’
> 1277 | DO_2OP_SAT_S(vqshls, DO_SQSHL_OP)
> | ^~~~~~~~~~~~
> ---
>
> target/arm/tcg/mve_helper.c: In function ‘do_sqrshl48_d’:
> target/arm/tcg/mve_helper.c:2463:17: warning: declaration of ‘extval’
> shadows a previous local [-Wshadow=compatible-local]
> 2463 | int64_t extval = sextract64(src << shift, 0, 48);
> | ^~~~~~
> target/arm/tcg/mve_helper.c:2443:18: note: shadowed declaration is here
> 2443 | int64_t val, extval;
> | ^~~~~~
> ---
>
> target/arm/tcg/mve_helper.c: In function ‘do_uqrshl48_d’:
> target/arm/tcg/mve_helper.c:2495:18: warning: declaration of ‘extval’
> shadows a previous local [-Wshadow=compatible-local]
> 2495 | uint64_t extval = extract64(src << shift, 0, 48);
> | ^~~~~~
> target/arm/tcg/mve_helper.c:2479:19: note: shadowed declaration is here
> 2479 | uint64_t val, extval;
> | ^~~~~~
>
> Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
thanks
-- PMM
- [PATCH v2 00/22] (few more) Steps towards enabling -Wshadow, Philippe Mathieu-Daudé, 2023/09/04
- [PATCH v2 01/22] tcg: Clean up local variable shadowing, Philippe Mathieu-Daudé, 2023/09/04
- [PATCH v2 02/22] target/arm/tcg: Clean up local variable shadowing, Philippe Mathieu-Daudé, 2023/09/04
- Re: [PATCH v2 02/22] target/arm/tcg: Clean up local variable shadowing,
Peter Maydell <=
- [PATCH v2 03/22] target/arm/hvf: Clean up local variable shadowing, Philippe Mathieu-Daudé, 2023/09/04
- [PATCH v2 04/22] target/mips: Clean up local variable shadowing, Philippe Mathieu-Daudé, 2023/09/04
- [PATCH v2 05/22] target/m68k: Clean up local variable shadowing, Philippe Mathieu-Daudé, 2023/09/04
- [PATCH v2 06/22] target/tricore: Clean up local variable shadowing, Philippe Mathieu-Daudé, 2023/09/04
- [PATCH v2 07/22] hw/arm/armv7m: Clean up local variable shadowing, Philippe Mathieu-Daudé, 2023/09/04
- [PATCH v2 08/22] hw/arm/virt: Clean up local variable shadowing, Philippe Mathieu-Daudé, 2023/09/04
- [PATCH v2 09/22] hw/arm/allwinner: Clean up local variable shadowing, Philippe Mathieu-Daudé, 2023/09/04