[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH v2 03/10] target/arm/translate-a64:Remove dead assignment in
From: |
Peter Maydell |
Subject: |
Re: [PATCH v2 03/10] target/arm/translate-a64:Remove dead assignment in handle_scalar_simd_shli() |
Date: |
Tue, 25 Aug 2020 13:37:44 +0100 |
On Tue, 25 Aug 2020 at 12:26, Chen Qun <kuhn.chenqun@huawei.com> wrote:
>
> Clang static code analyzer show warning:
> target/arm/translate-a64.c:8635:14: warning: Value stored to 'tcg_rn' during
> its
> initialization is never read
> TCGv_i64 tcg_rn = new_tmp_a64(s);
> ^~~~~~ ~~~~~~~~~~~~~~
> target/arm/translate-a64.c:8636:14: warning: Value stored to 'tcg_rd' during
> its
> initialization is never read
> TCGv_i64 tcg_rd = new_tmp_a64(s);
> ^~~~~~ ~~~~~~~~~~~~~~
>
> There is a memory leak for the variable new_tmp_a64 "s".
There is not, because TCG temps allocated via new_tmp_a64()
are all freed via free_tmp_a64() at the end of disas_a64_insn().
> We should delete the assignment.
But yes, the assignments are unused and should be deleted.
If you fix the commit message, then
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
thanks
-- PMM
- [PATCH v2 00/10] trivial patchs for static code analyzer fixes, Chen Qun, 2020/08/25
- [PATCH v2 05/10] hw/virtio/vhost-user:Remove dead assignment in scrub_shadow_regions(), Chen Qun, 2020/08/25
- [PATCH v2 01/10] hw/arm/virt-acpi-build:Remove dead assignment in build_madt(), Chen Qun, 2020/08/25
- [PATCH v2 03/10] target/arm/translate-a64:Remove dead assignment in handle_scalar_simd_shli(), Chen Qun, 2020/08/25
- Re: [PATCH v2 03/10] target/arm/translate-a64:Remove dead assignment in handle_scalar_simd_shli(),
Peter Maydell <=
- [PATCH v2 02/10] hw/arm/omap1:Remove redundant statement in omap_clkdsp_read(), Chen Qun, 2020/08/25
- [PATCH v2 04/10] target/arm/translate-a64:Remove redundant statement in disas_simd_two_reg_misc_fp16(), Chen Qun, 2020/08/25
- [PATCH v2 07/10] vfio/platform: Remove dead assignment in vfio_intp_interrupt(), Chen Qun, 2020/08/25