Message ID | 20200321114615.5360-7-philmd@redhat.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show
Return-Path: <SRS0=N13U=5G=nongnu.org=qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@kernel.org> Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id ADB9514B4 for <patchwork-qemu-devel@patchwork.kernel.org>; Sat, 21 Mar 2020 11:50:17 +0000 (UTC) Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 8155B20714 for <patchwork-qemu-devel@patchwork.kernel.org>; Sat, 21 Mar 2020 11:50:17 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="Tq/L3856" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 8155B20714 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=redhat.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Received: from localhost ([::1]:35602 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from <qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org>) id 1jFcds-0008K8-Jr for patchwork-qemu-devel@patchwork.kernel.org; Sat, 21 Mar 2020 07:50:16 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:34949) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from <philmd@redhat.com>) id 1jFcav-0001oi-FR for qemu-devel@nongnu.org; Sat, 21 Mar 2020 07:47:15 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from <philmd@redhat.com>) id 1jFcau-0006mI-Cu for qemu-devel@nongnu.org; Sat, 21 Mar 2020 07:47:13 -0400 Received: from us-smtp-delivery-74.mimecast.com ([63.128.21.74]:32827) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from <philmd@redhat.com>) id 1jFcau-0006lv-8k for qemu-devel@nongnu.org; Sat, 21 Mar 2020 07:47:12 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1584791231; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=aNR2u2S6oJHTNfAafS+3cPQs0kK7tiu5/JdDcxGLqd4=; b=Tq/L3856aXpuuOxtrB+E6F7Q221K6zc0EbsoHat46j6Ucl+Gd/3yZkf/gNx8OxjctnD4xz /Y1k5nHNztKxizYd5uFYMYsC6gWIUoAnM2a3YGInzN/+IvWIhTlQpLVqu2L7PZZzWRZlN9 1aWfvnjYXZasJbsQE1OXBP0PBKK8pAk= Received: from mail-wr1-f72.google.com (mail-wr1-f72.google.com [209.85.221.72]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-206-zayRbczbPfm3hldlPf6teQ-1; Sat, 21 Mar 2020 07:47:10 -0400 X-MC-Unique: zayRbczbPfm3hldlPf6teQ-1 Received: by mail-wr1-f72.google.com with SMTP id t4so4194608wrr.1 for <qemu-devel@nongnu.org>; Sat, 21 Mar 2020 04:47:10 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=10vzrd1KB4hBe4ZZMwH09166mQI1VXUjkd4JvuSfJzs=; b=uGLxLXLXQs9BxQ2G++p2u87OKLQCqldLa7lB6dIlIN1MGb0xTc5UwKHoZVsbufvhqx SL++kbGjjPB16AjhtGnSiqz+ujebXI7odfBJU6HtauRYwQJZBKED1JNqvtVaJmsoYZIb pwN+TUFKiMJCwzCG+kLJuaP0ohNzWJjWE32O1OULbx71yco3gI8xVB53rsHiyDV7tgHh ExGGmiGT08oWBE72XdQ9FCzGa4X9zPozJ45UmN+KKEI8d1kmu+lPxlubAUpxmKtXkf0Y rJRNT/pDlB0vM775xURiNyTvkpSq7sssd1DfB6PHLeZ09C1y3SwveVMFe7WtjkLo7gYf t6Qg== X-Gm-Message-State: ANhLgQ0fwLCCQmJ4dwXRvk3uxXMxjRP8OqzDspqa3sHX/T/kSctPom+7 lxvl7KNbL8ACBy9GG0wePowg6QL5IY+cG64zXJ/Vt8yFDoWQv2RMxeps89ieVtugYoHvszRLHv0 FyfUBegCMIxPRbXY= X-Received: by 2002:a1c:acc8:: with SMTP id v191mr16571800wme.185.1584791229021; Sat, 21 Mar 2020 04:47:09 -0700 (PDT) X-Google-Smtp-Source: ADFU+vuEZgHJ9R2CzOVD7FrVhKwfAt4ODRiXCw3f347rqB1NUIjLfREWV9rK0W33q2PNc68qUhcXew== X-Received: by 2002:a1c:acc8:: with SMTP id v191mr16571770wme.185.1584791228755; Sat, 21 Mar 2020 04:47:08 -0700 (PDT) Received: from localhost.localdomain (37.red-83-52-54.dynamicip.rima-tde.net. [83.52.54.37]) by smtp.gmail.com with ESMTPSA id v7sm12822140wml.18.2020.03.21.04.47.06 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 21 Mar 2020 04:47:08 -0700 (PDT) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= <philmd@redhat.com> To: qemu-devel@nongnu.org Subject: [PATCH-for-5.0 06/11] hw/isa/i82378: Remove dead assignment Date: Sat, 21 Mar 2020 12:46:10 +0100 Message-Id: <20200321114615.5360-7-philmd@redhat.com> X-Mailer: git-send-email 2.21.1 In-Reply-To: <20200321114615.5360-1-philmd@redhat.com> References: <20200321114615.5360-1-philmd@redhat.com> MIME-Version: 1.0 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset=UTF-8; text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 63.128.21.74 X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: <qemu-devel.nongnu.org> List-Unsubscribe: <https://lists.nongnu.org/mailman/options/qemu-devel>, <mailto:qemu-devel-request@nongnu.org?subject=unsubscribe> List-Archive: <https://lists.nongnu.org/archive/html/qemu-devel> List-Post: <mailto:qemu-devel@nongnu.org> List-Help: <mailto:qemu-devel-request@nongnu.org?subject=help> List-Subscribe: <https://lists.nongnu.org/mailman/listinfo/qemu-devel>, <mailto:qemu-devel-request@nongnu.org?subject=subscribe> Cc: Fam Zheng <fam@euphon.net>, Peter Maydell <peter.maydell@linaro.org>, "Michael S. Tsirkin" <mst@redhat.com>, Michael Tokarev <mjt@tls.msk.ru>, qemu-block@nongnu.org, qemu-trivial@nongnu.org, Markus Armbruster <armbru@redhat.com>, =?utf-8?q?Herv=C3=A9_Poussineau?= <hpoussin@reactos.org>, Joel Stanley <joel@jms.id.au>, Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>, Alistair Francis <alistair@alistair23.me>, qemu-arm@nongnu.org, =?utf-8?q?C?= =?utf-8?q?=C3=A9dric_Le_Goater?= <clg@kaod.org>, John Snow <jsnow@redhat.com>, David Gibson <david@gibson.dropbear.id.au>, Kevin Wolf <kwolf@redhat.com>, Andrew Jeffery <andrew@aj.id.au>, =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= <philmd@redhat.com>, Laurent Vivier <laurent@vivier.eu>, Max Reitz <mreitz@redhat.com>, Igor Mitsyanko <i.mitsyanko@gmail.com>, qemu-ppc@nongnu.org, Paolo Bonzini <pbonzini@redhat.com> Errors-To: qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Sender: "Qemu-devel" <qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org> |
Series |
misc: Trivial static code analyzer fixes
|
expand
|
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)
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é <philmd@redhat.com> --- hw/isa/i82378.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-)