[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PULL v2 16/19] hw/isa/i82378: Remove dead assignment
From: |
Laurent Vivier |
Subject: |
[PULL v2 16/19] hw/isa/i82378: Remove dead assignment |
Date: |
Mon, 4 May 2020 17:59:53 +0200 |
From: Philippe Mathieu-Daudé <address@hidden>
Rename the unique variable assigned as 'pit' which better
represents what it holds, to fix a warning reported by the
Clang static code analyzer:
CC hw/isa/i82378.o
hw/isa/i82378.c:108:5: warning: Value stored to 'isa' is never read
isa = isa_create_simple(isabus, "i82374");
^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Reported-by: Clang Static Analyzer
Reviewed-by: Alistair Francis <address@hidden>
Signed-off-by: Philippe Mathieu-Daudé <address@hidden>
Message-Id: <address@hidden>
Signed-off-by: Laurent Vivier <address@hidden>
---
hw/isa/i82378.c | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/hw/isa/i82378.c b/hw/isa/i82378.c
index dcb6b479ea0d..d9e6c7fa0096 100644
--- a/hw/isa/i82378.c
+++ b/hw/isa/i82378.c
@@ -67,7 +67,7 @@ static void i82378_realize(PCIDevice *pci, Error **errp)
I82378State *s = I82378(dev);
uint8_t *pci_conf;
ISABus *isabus;
- ISADevice *isa;
+ ISADevice *pit;
pci_conf = pci->config;
pci_set_word(pci_conf + PCI_COMMAND,
@@ -99,13 +99,13 @@ static void i82378_realize(PCIDevice *pci, Error **errp)
isa_bus_irqs(isabus, s->i8259);
/* 1 82C54 (pit) */
- isa = i8254_pit_init(isabus, 0x40, 0, NULL);
+ pit = i8254_pit_init(isabus, 0x40, 0, NULL);
/* speaker */
- pcspk_init(isabus, isa);
+ pcspk_init(isabus, pit);
/* 2 82C37 (dma) */
- isa = isa_create_simple(isabus, "i82374");
+ isa_create_simple(isabus, "i82374");
}
static void i82378_init(Object *obj)
--
2.26.2
- [PULL v2 12/19] blockdev: Remove dead assignment, (continued)
- [PULL v2 12/19] blockdev: Remove dead assignment, Laurent Vivier, 2020/05/04
- [PULL v2 01/19] scsi/esp-pci: add g_assert() for fix clang analyzer warning in esp_pci_io_write(), Laurent Vivier, 2020/05/04
- [PULL v2 10/19] Compress lines for immediate return, Laurent Vivier, 2020/05/04
- [PULL v2 09/19] chardev: Add macOS to list of OSes that support -chardev serial, Laurent Vivier, 2020/05/04
- [PULL v2 13/19] hw/i2c/pm_smbus: Remove dead assignment, Laurent Vivier, 2020/05/04
- [PULL v2 17/19] hw/gpio/aspeed_gpio: Remove dead assignment, Laurent Vivier, 2020/05/04
- [PULL v2 19/19] hw/timer/pxa2xx_timer: Add assertion to silent static analyzer warning, Laurent Vivier, 2020/05/04
- [PULL v2 15/19] hw/ide/sii3112: Remove dead assignment, Laurent Vivier, 2020/05/04
- [PULL v2 11/19] block: Avoid dead assignment, Laurent Vivier, 2020/05/04
- [PULL v2 14/19] hw/input/adb-kbd: Remove dead assignment, Laurent Vivier, 2020/05/04
- [PULL v2 16/19] hw/isa/i82378: Remove dead assignment,
Laurent Vivier <=
- [PULL v2 18/19] hw/timer/stm32f2xx_timer: Remove dead assignment, Laurent Vivier, 2020/05/04
- Re: [PULL v2 00/19] Trivial branch for 5.1 patches, Peter Maydell, 2020/05/05