aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChen Qun <kuhn.chenqun@huawei.com>2020-08-27 19:03:02 +0800
committerLaurent Vivier <laurent@vivier.eu>2020-09-01 11:52:25 +0200
commitb3b0e8145892520d0ae315950379b947a9c7afa6 (patch)
tree78a64f3ef8d404e2610e3ee6bfa65f9d403f64ea
parent38be863d418a507bd2b27f20c4585c50eace8b98 (diff)
hw/arm/virt-acpi-build:Remove dead assignment in build_madt()
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> Reviewed-by: Igor Mammedov <imammedo@redhat.com> Reviewed-by: Li Qiang <liq3ea@gmail.com> Reviewed-by: Michael S. Tsirkin <mst@redhat.com> Message-Id: <20200827110311.164316-2-kuhn.chenqun@huawei.com> Signed-off-by: Laurent Vivier <laurent@vivier.eu>
-rw-r--r--hw/arm/virt-acpi-build.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/hw/arm/virt-acpi-build.c b/hw/arm/virt-acpi-build.c
index 0a482ff6f7..9efd7a3881 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;