[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH 01/11] hw/arm/virt-acpi-build:Remove dead assignment in build_mad
From: |
Chen Qun |
Subject: |
[PATCH 01/11] hw/arm/virt-acpi-build:Remove dead assignment in build_madt() |
Date: |
Thu, 13 Aug 2020 15:37:02 +0800 |
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);
^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
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;
--
2.23.0
- Re: [PATCH 07/11] vfio/platform: Remove dead assignment in vfio_intp_interrupt(), (continued)
[PATCH 06/11] hw/net/virtio-net:Remove redundant statement in virtio_net_rsc_tcp_ctrl_check(), Chen Qun, 2020/08/13
[PATCH 08/11] tcg/optimize: Remove redundant statement in tcg_optimize(), Chen Qun, 2020/08/13
[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 <=
[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