[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH 01/11] hw/arm/virt-acpi-build:Remove dead assignment in build
From: |
Igor Mammedov |
Subject: |
Re: [PATCH 01/11] hw/arm/virt-acpi-build:Remove dead assignment in build_madt() |
Date: |
Wed, 19 Aug 2020 13:06:28 +0200 |
On Thu, 13 Aug 2020 15:37:02 +0800
Chen Qun <kuhn.chenqun@huawei.com> wrote:
> Clang static code analyzer show warning:
> hw/arm/virt-acpi-build.c:641:5: warning: Value stored to 'madt' is never read
> madt = acpi_data_push(table_data, sizeof *madt);
> ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Reviewed-by: Igor Mammedov <imammedo@redhat.com>
>
> Reported-by: Euler Robot <euler.robot@huawei.com>
> Signed-off-by: Chen Qun <kuhn.chenqun@huawei.com>
> ---
> Cc: Shannon Zhao <shannon.zhaosl@gmail.com>
> Cc: Peter Maydell <peter.maydell@linaro.org>
> Cc: "Michael S. Tsirkin" <mst@redhat.com>
> Cc: Igor Mammedov <imammedo@redhat.com>
> Cc: qemu-arm@nongnu.org
> ---
> hw/arm/virt-acpi-build.c | 3 +--
> 1 file changed, 1 insertion(+), 2 deletions(-)
>
> diff --git a/hw/arm/virt-acpi-build.c b/hw/arm/virt-acpi-build.c
> index 91f0df7b13..f830f9b779 100644
> --- a/hw/arm/virt-acpi-build.c
> +++ b/hw/arm/virt-acpi-build.c
> @@ -633,12 +633,11 @@ build_madt(GArray *table_data, BIOSLinker *linker,
> VirtMachineState *vms)
> int madt_start = table_data->len;
> const MemMapEntry *memmap = vms->memmap;
> const int *irqmap = vms->irqmap;
> - AcpiMultipleApicTable *madt;
> AcpiMadtGenericDistributor *gicd;
> AcpiMadtGenericMsiFrame *gic_msi;
> int i;
>
> - madt = acpi_data_push(table_data, sizeof *madt);
> + acpi_data_push(table_data, sizeof(AcpiMultipleApicTable));
>
> gicd = acpi_data_push(table_data, sizeof *gicd);
> gicd->type = ACPI_APIC_GENERIC_DISTRIBUTOR;
- Re: [PATCH 07/11] vfio/platform: Remove dead assignment in vfio_intp_interrupt(), (continued)
- [PATCH 09/11] usb/bus: Remove dead assignment in usb_get_fw_dev_path(), Chen Qun, 2020/08/13
- [PATCH 01/11] hw/arm/virt-acpi-build:Remove dead assignment in build_madt(), Chen Qun, 2020/08/13
- [PATCH 11/11] hw/display/vga:Remove redundant statement in vga_draw_graphic(), Chen Qun, 2020/08/13
- [PATCH 10/11] hw/intc: Remove redundant statement in exynos4210_combiner_read(), Chen Qun, 2020/08/13
- Re: [PATCH 00/11] trivial patchs for static code analyzer fixes, no-reply, 2020/08/13
- Re: [PATCH 00/11] trivial patchs for static code analyzer fixes, no-reply, 2020/08/13