qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Laurent Vivier <laurent@vivier.eu>
To: qemu-devel@nongnu.org
Cc: qemu-trivial@nongnu.org,
	"Philippe Mathieu-Daudé" <philmd@redhat.com>,
	"Alistair Francis" <alistair.francis@wdc.com>,
	"Michael Tokarev" <mjt@tls.msk.ru>,
	"Laurent Vivier" <laurent@vivier.eu>
Subject: [PULL v2 16/19] hw/isa/i82378: Remove dead assignment
Date: Mon,  4 May 2020 17:59:53 +0200	[thread overview]
Message-ID: <20200504155956.380695-17-laurent@vivier.eu> (raw)
In-Reply-To: <20200504155956.380695-1-laurent@vivier.eu>

From: Philippe Mathieu-Daudé <philmd@redhat.com>

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 <alistair.francis@wdc.com>
Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Message-Id: <20200422133152.16770-7-philmd@redhat.com>
Signed-off-by: Laurent Vivier <laurent@vivier.eu>
---
 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



  parent reply	other threads:[~2020-05-04 16:13 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-05-04 15:59 [PULL v2 00/19] Trivial branch for 5.1 patches Laurent Vivier
2020-05-04 15:59 ` [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 15:59 ` [PULL v2 02/19] display/blizzard: use extract16() for fix clang analyzer warning in blizzard_draw_line16_32() Laurent Vivier
2020-05-04 15:59 ` [PULL v2 03/19] timer/exynos4210_mct: Remove redundant statement in exynos4210_mct_write() Laurent Vivier
2020-05-04 15:59 ` [PULL v2 04/19] MAINTAINERS: Mark the LatticeMico32 target as orphan Laurent Vivier
2020-05-04 15:59 ` [PULL v2 05/19] hw/mem/pc-dimm: Print slot number on error at pc_dimm_pre_plug() Laurent Vivier
2020-05-04 15:59 ` [PULL v2 06/19] hw/mem/pc-dimm: Fix line over 80 characters warning Laurent Vivier
2020-05-04 15:59 ` [PULL v2 07/19] elf_ops: Don't try to g_mapped_file_unref(NULL) Laurent Vivier
2020-05-04 15:59 ` [PULL v2 08/19] MAINTAINERS: Update Keith Busch's email address Laurent Vivier
2020-05-04 15:59 ` [PULL v2 09/19] chardev: Add macOS to list of OSes that support -chardev serial Laurent Vivier
2020-05-04 15:59 ` [PULL v2 10/19] Compress lines for immediate return Laurent Vivier
2020-05-04 15:59 ` [PULL v2 11/19] block: Avoid dead assignment Laurent Vivier
2020-05-04 15:59 ` [PULL v2 12/19] blockdev: Remove " Laurent Vivier
2020-05-04 15:59 ` [PULL v2 13/19] hw/i2c/pm_smbus: " Laurent Vivier
2020-05-04 15:59 ` [PULL v2 14/19] hw/input/adb-kbd: " Laurent Vivier
2020-05-04 15:59 ` [PULL v2 15/19] hw/ide/sii3112: " Laurent Vivier
2020-05-04 15:59 ` Laurent Vivier [this message]
2020-05-04 15:59 ` [PULL v2 17/19] hw/gpio/aspeed_gpio: " Laurent Vivier
2020-05-04 15:59 ` [PULL v2 18/19] hw/timer/stm32f2xx_timer: " Laurent Vivier
2020-05-04 15:59 ` [PULL v2 19/19] hw/timer/pxa2xx_timer: Add assertion to silent static analyzer warning Laurent Vivier
2020-05-05 14:47 ` [PULL v2 00/19] Trivial branch for 5.1 patches Peter Maydell

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20200504155956.380695-17-laurent@vivier.eu \
    --to=laurent@vivier.eu \
    --cc=alistair.francis@wdc.com \
    --cc=mjt@tls.msk.ru \
    --cc=philmd@redhat.com \
    --cc=qemu-devel@nongnu.org \
    --cc=qemu-trivial@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).