[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH-for-5.0 v2 06/11] hw/isa/i82378: Remove dead assignment
From: |
Alistair Francis |
Subject: |
Re: [PATCH-for-5.0 v2 06/11] hw/isa/i82378: Remove dead assignment |
Date: |
Mon, 23 Mar 2020 08:51:28 -0700 |
On Sat, Mar 21, 2020 at 7:46 AM Philippe Mathieu-Daudé
<address@hidden> wrote:
>
> 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
> Signed-off-by: Philippe Mathieu-Daudé <address@hidden>
Reviewed-by: Alistair Francis <address@hidden>
Alistair
> ---
> 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 dcb6b479ea..d9e6c7fa00 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.21.1
>
>
- [PATCH-for-5.0 v2 01/11] block: Avoid dead assignment, (continued)
- [PATCH-for-5.0 v2 01/11] block: Avoid dead assignment, Philippe Mathieu-Daudé, 2020/03/21
- [PATCH-for-5.0 v2 02/11] blockdev: Remove dead assignment, Philippe Mathieu-Daudé, 2020/03/21
- [PATCH-for-5.0 v2 03/11] hw/i2c/pm_smbus: Remove dead assignment, Philippe Mathieu-Daudé, 2020/03/21
- [PATCH-for-5.0 v2 04/11] hw/input/adb-kbd: Remove dead assignment, Philippe Mathieu-Daudé, 2020/03/21
- [PATCH-for-5.0 v2 05/11] hw/ide/sii3112: Remove dead assignment, Philippe Mathieu-Daudé, 2020/03/21
- [PATCH-for-5.0 v2 06/11] hw/isa/i82378: Remove dead assignment, Philippe Mathieu-Daudé, 2020/03/21
- Re: [PATCH-for-5.0 v2 06/11] hw/isa/i82378: Remove dead assignment,
Alistair Francis <=
- [PATCH-for-5.0 v2 07/11] hw/gpio/aspeed_gpio: Remove dead assignment, Philippe Mathieu-Daudé, 2020/03/21
- [PATCH-for-5.0 v2 08/11] hw/timer/exynos4210_mct: Remove dead assignments, Philippe Mathieu-Daudé, 2020/03/21
- [PATCH-for-5.0 v2 09/11] hw/timer/stm32f2xx_timer: Remove dead assignment, Philippe Mathieu-Daudé, 2020/03/21
- [PATCH-for-5.0 v2 10/11] hw/timer/pxa2xx_timer: Add assertion to silent static analyzer warning, Philippe Mathieu-Daudé, 2020/03/21
- [PATCH-for-5.0 v2 11/11] hw/scsi/esp-pci: Remove dead assignment, Philippe Mathieu-Daudé, 2020/03/21