From nobody Fri May 3 06:16:17 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1584801783; cv=none; d=zohomail.com; s=zohoarc; b=BgTD0b5c7p+M33AABPzayX05kKc+k2mlwscSHSzgnKxpUON53zShLjgnLdm3SddrpHKaYMVOdPRT411nBtduZbo6NEjpN5fURRlaw2duI+kVifa3ZztkBKRi36yGjgGRqYaDk5SxYsBZTjTeKLyn5hpESHFQHHPieiUTA7M9I3w= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1584801783; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=6MeQLKCK+LuR97mOw2w6FbyM0pW3k0RrlHbblQ2lvrE=; b=fIoGLRGPZ//bqNjYzm34mQGoT4Mp9Viu47P7uA4B3ojio4+hWGvOGYk3UHBIcQMXKjcqQgQB1NO6atoqCEmUV1l8vq9wMsCdIXKk9fdBsra4CEbB+utja5LNdlMc7Ws1V9SN8VBMg5GZD/mqcZdmChV2ANeW1jYIOLyAU5i4aO0= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1584801783236185.1410246962015; Sat, 21 Mar 2020 07:43:03 -0700 (PDT) Received: from localhost ([::1]:37564 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jFfL3-0006ai-RQ for importer@patchew.org; Sat, 21 Mar 2020 10:43:01 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:59588) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jFfJV-0004UH-8c for qemu-devel@nongnu.org; Sat, 21 Mar 2020 10:41:26 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1jFfJU-0007C7-79 for qemu-devel@nongnu.org; Sat, 21 Mar 2020 10:41:25 -0400 Received: from us-smtp-delivery-74.mimecast.com ([63.128.21.74]:58908) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1jFfJU-0007Bn-3W for qemu-devel@nongnu.org; Sat, 21 Mar 2020 10:41:24 -0400 Received: from mail-wr1-f71.google.com (mail-wr1-f71.google.com [209.85.221.71]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-256-Ni6M4TW7PSSCA7qqZN1-BQ-1; Sat, 21 Mar 2020 10:41:22 -0400 Received: by mail-wr1-f71.google.com with SMTP id j12so520898wrr.18 for ; Sat, 21 Mar 2020 07:41:21 -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 g8sm12548446wmk.26.2020.03.21.07.41.18 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 21 Mar 2020 07:41:19 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1584801683; 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=6MeQLKCK+LuR97mOw2w6FbyM0pW3k0RrlHbblQ2lvrE=; b=Se5ImLpPLNWX68roFRPISAkU2sGO3HGRaPdwXRZy6BmXC0C3Cy2iAvExGOH6s6Uu1CFX9+ SKQCb0ZmJ4O6IIF7ygGwV/kSbbrHeN/SMvsLUOvh1J3RIEivkvS32g/UK/jAYgoh1kw8zh yvD1WdeOJYb7QGRcOZzNaenwDUPPCiI= X-MC-Unique: Ni6M4TW7PSSCA7qqZN1-BQ-1 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=rRfIK8MnVsl+DYnTbm2DpmqG3rx4tJjk7CYNvTrwi2Q=; b=YJQMNo+TUR4OrJet425bdWw37I/1uwcsCdw2Rh69cgQzNOyfgdZea4fTbp6q0lTDpp fcp9YJWZuCKtTsVtOM61drf0GI6ALTZ61kPO9LnBemHfaS0GprXWJrn9nhyd/Y/B9x/1 EFLeysnf6YSTIiokr6YNAuCbTPbJXk9J271ONbVnUgJ/njzn22lN004lW/1Ly6tEnygQ DY01FjLpShA1f6yShO3AKo7Tps16Lnk+sxikc8hJEhajQhNF0hqxWBzHFXTISel9UN7p k94R5AxlA3/ursXOkSH9G11QnZF0F+XSJmxLykkXIaIfTOIVYL2Jgw44pa5cmk7V4dBv JetQ== X-Gm-Message-State: ANhLgQ1Qp/tnyQz/4rs28rjVml6dK3FY8Lu22Ji81PaYQdSsVMBXtHAY hlMWb6QESNnoRCBU31jzm3GT6/CN43H+KggYWD8BYOd7Qr/UxE4SkjRon/h4g5Ku7XtGigLTydH SjbVlzGH/AiEf9T8= X-Received: by 2002:a1c:9a82:: with SMTP id c124mr14832226wme.22.1584801680629; Sat, 21 Mar 2020 07:41:20 -0700 (PDT) X-Google-Smtp-Source: ADFU+vucmBxxcI1me0oyxUGVj0nozGfJ5SenYW+m04rwHPopLbF6as7MiEM9Um8gxGayKY1KpNfIBw== X-Received: by 2002:a1c:9a82:: with SMTP id c124mr14832189wme.22.1584801680439; Sat, 21 Mar 2020 07:41:20 -0700 (PDT) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Subject: [PATCH-for-5.0 v2 01/11] block: Avoid dead assignment Date: Sat, 21 Mar 2020 15:41:00 +0100 Message-Id: <20200321144110.5010-2-philmd@redhat.com> X-Mailer: git-send-email 2.21.1 In-Reply-To: <20200321144110.5010-1-philmd@redhat.com> References: <20200321144110.5010-1-philmd@redhat.com> MIME-Version: 1.0 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com 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: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Fam Zheng , Peter Maydell , "Michael S. Tsirkin" , Mark Cave-Ayland , qemu-block@nongnu.org, qemu-trivial@nongnu.org, Markus Armbruster , =?UTF-8?q?Herv=C3=A9=20Poussineau?= , Joel Stanley , Michael Tokarev , Alistair Francis , qemu-arm@nongnu.org, =?UTF-8?q?C=C3=A9dric=20Le=20Goater?= , John Snow , David Gibson , Kevin Wolf , Andrew Jeffery , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Laurent Vivier , Max Reitz , Igor Mitsyanko , qemu-ppc@nongnu.org, Paolo Bonzini Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) Content-Type: text/plain; charset="utf-8"; text/plain; charset="utf-8" Fix warning reported by Clang static code analyzer: block.c:3167:5: warning: Value stored to 'ret' is never read ret =3D bdrv_fill_options(&options, filename, &flags, &local_err); ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Fixes: 462f5bcf6 Reported-by: Clang Static Analyzer Suggested-by: Markus Armbruster Signed-off-by: Philippe Mathieu-Daud=C3=A9 Reviewed-by: Alistair Francis --- v2: Keep 'ret' assigned and check it (Markus) --- block.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/block.c b/block.c index a2542c977b..a6f069d8bd 100644 --- a/block.c +++ b/block.c @@ -3165,7 +3165,7 @@ static BlockDriverState *bdrv_open_inherit(const char= *filename, } =20 ret =3D bdrv_fill_options(&options, filename, &flags, &local_err); - if (local_err) { + if (ret < 0) { goto fail; } =20 --=20 2.21.1 From nobody Fri May 3 06:16:17 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1584801819; cv=none; d=zohomail.com; s=zohoarc; b=DQG0xTBh4r5ifKTtUZieVroo8g+vvAQpsK31P1+n6y0sjCF7J5JRoh4TO8Fzmac0LCek9AckGUywyybh94FeaNA67nWGxAVU2Qd+0HRZ4O6zSIPEjpn3Z+ezqZedu2T8NYPw998u3UErXhY45eK5E2lpICkuAzVTfD2oxwuW4H8= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1584801819; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=2U6ARuvMvLKS+fqGTEoijz7r0B3fBwOwTnOOBFQNRAw=; b=dXbImrKC/Xif3qzs+aY7e8HEtG5O57nQccT/jYMzUoKnHp/eQJxXuXF4PQ1XQdUL9S0hJEAqAkdHTTie2L0xS0UUzhlJf4Mo3/WwaSQEpxZkvESr+ANKrMF/iUZP5e3j4X+NsWv39V07BQBIUlIBiGuQBvI3APaUJQgIP7Ab59M= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1584801819160732.733801815024; Sat, 21 Mar 2020 07:43:39 -0700 (PDT) Received: from localhost ([::1]:37574 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jFfLd-0007dd-Vg for importer@patchew.org; Sat, 21 Mar 2020 10:43:38 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:59699) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jFfJb-0004ho-AL for qemu-devel@nongnu.org; Sat, 21 Mar 2020 10:41:32 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1jFfJa-0007H1-7O for qemu-devel@nongnu.org; Sat, 21 Mar 2020 10:41:31 -0400 Received: from us-smtp-delivery-74.mimecast.com ([63.128.21.74]:33211) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1jFfJa-0007GM-3V for qemu-devel@nongnu.org; Sat, 21 Mar 2020 10:41:30 -0400 Received: from mail-wr1-f71.google.com (mail-wr1-f71.google.com [209.85.221.71]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-286-Ta8MsF--PWKq39LolxhfaA-1; Sat, 21 Mar 2020 10:41:28 -0400 Received: by mail-wr1-f71.google.com with SMTP id b12so4405662wro.4 for ; Sat, 21 Mar 2020 07:41:28 -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 r3sm14054273wrw.76.2020.03.21.07.41.24 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 21 Mar 2020 07:41:26 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1584801689; 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=2U6ARuvMvLKS+fqGTEoijz7r0B3fBwOwTnOOBFQNRAw=; b=OcPR5Z8MaC/teIqHLYrkBtvCh/3ixO47hPlR6SsEbjxbANl5zCrQSKJc6neBDahnrxoSGL VQSxdpN6BrtgN20EssYpBLC9/Q+R+Kx3E54Q1GAzsYCt9i62Vu1coHFCAoGtqG/m6u+aIT klqjpXjuJN/5FAHzS16xpfv2c4X8AYU= X-MC-Unique: Ta8MsF--PWKq39LolxhfaA-1 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=ez+E9s5mwrT8B9y8nVUYgFPf3iN6ckUcWWVa90evmD4=; b=oIbfvpHOtT4+CvVWq1QjXwByxA++YVyEFROpeEbrfnOf4eEMyXTfBGUf02tRP/l6GU t6z1lPcJa/gvb/3BfW8h5YD2aMiijm3YnGjxbsf1NeXnJKtcz7VXg6EgMlBBnatK2nrE sMwDHcBRQMrvE3yU261+vPDJZedNh6DVTPc8PMIu0gfBP2lA+3kRyuATMfj9mlR0nD28 9Dr272M+OlmrsynyAyMl6zetRtvKMNRehkHVW9D60DuUR8qYlNr0GC1MjhHr1mSg6S86 +cpM5nO4OfzTGizUXPkdvNMvOtWeUnIJuM+TVwtwFjZdRhuYd/8xm4S2veEcAdSB8Q39 NU6A== X-Gm-Message-State: ANhLgQ0HOkrxculNTpFisulYy+PZM4UeTN31TAh1qA7VMXy+TsDDKZzc eEwQFzCzIM/qWuZgGlQX2e8RgRFAc3cLn00cy3hqJByHp5TNF/cb6RYOuoXEB0/YJ1y/oOo2dRe 7TvT/EA6zz7d7LZg= X-Received: by 2002:adf:9071:: with SMTP id h104mr17944858wrh.359.1584801686947; Sat, 21 Mar 2020 07:41:26 -0700 (PDT) X-Google-Smtp-Source: ADFU+vvT4CVQxA5nLMDXZhZEREy/9sQIXUlQ2wJ9ez38CCElrT64mFRDHk077ZFhB6T9v5dilo0t2Q== X-Received: by 2002:adf:9071:: with SMTP id h104mr17944810wrh.359.1584801686647; Sat, 21 Mar 2020 07:41:26 -0700 (PDT) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Subject: [PATCH-for-5.0 v2 02/11] blockdev: Remove dead assignment Date: Sat, 21 Mar 2020 15:41:01 +0100 Message-Id: <20200321144110.5010-3-philmd@redhat.com> X-Mailer: git-send-email 2.21.1 In-Reply-To: <20200321144110.5010-1-philmd@redhat.com> References: <20200321144110.5010-1-philmd@redhat.com> MIME-Version: 1.0 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com 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: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Fam Zheng , Peter Maydell , "Michael S. Tsirkin" , Mark Cave-Ayland , qemu-block@nongnu.org, qemu-trivial@nongnu.org, Markus Armbruster , =?UTF-8?q?Herv=C3=A9=20Poussineau?= , Joel Stanley , Michael Tokarev , Alistair Francis , qemu-arm@nongnu.org, =?UTF-8?q?C=C3=A9dric=20Le=20Goater?= , John Snow , David Gibson , Kevin Wolf , Andrew Jeffery , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Laurent Vivier , Max Reitz , Igor Mitsyanko , qemu-ppc@nongnu.org, Paolo Bonzini Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) Content-Type: text/plain; charset="utf-8"; text/plain; charset="utf-8" Fix warning reported by Clang static code analyzer: CC blockdev.o blockdev.c:2744:5: warning: Value stored to 'ret' is never read ret =3D blk_truncate(blk, size, false, PREALLOC_MODE_OFF, errp); ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Reported-by: Clang Static Analyzer Signed-off-by: Philippe Mathieu-Daud=C3=A9 --- blockdev.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/blockdev.c b/blockdev.c index fa8630cb41..6effd5afaa 100644 --- a/blockdev.c +++ b/blockdev.c @@ -2741,7 +2741,7 @@ void qmp_block_resize(bool has_device, const char *de= vice, } =20 bdrv_drained_begin(bs); - ret =3D blk_truncate(blk, size, false, PREALLOC_MODE_OFF, errp); + blk_truncate(blk, size, false, PREALLOC_MODE_OFF, errp); bdrv_drained_end(bs); =20 out: --=20 2.21.1 From nobody Fri May 3 06:16:17 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1584802048; cv=none; d=zohomail.com; s=zohoarc; b=Owz7o00v3AUy2d7VWWAcGINDTuCZQGBf/AYcuRm/zmzQRjp0yrOhviXAlgXgTPPo1YVsweR5saMzfz4bi9G5NV4ppQsvBEps6fj3aedoHDzn1Xjih3qR0flBYt9TXW3EFKT0OlIuJbSoUcbN1ZYGDCUPOtExdkRfYPiWMdzXEgA= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1584802048; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=kQDd9EbUfb0uuK6iIsTzZMSp5qbZytglJrEh2QYroHU=; b=nWki9HF+/DHrYWrEx24U9Mr+gQh7468sSmjJbTcBVrIe1R7PMKorH7mUC5LaQcpOV4X+lC4JSMZ/10bGsV2ks92vlNfkMoNM+cvyGAYTSxhDI3odHHGchWqoD0G6htQnh1xqyAWWQkyUJXCslcbAze7aoU8vgxFvGgiY9WTWOx8= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 15848020480681019.5228503515089; Sat, 21 Mar 2020 07:47:28 -0700 (PDT) Received: from localhost ([::1]:37692 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jFfPK-0004my-R3 for importer@patchew.org; Sat, 21 Mar 2020 10:47:26 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:59796) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jFfJk-00050H-E1 for qemu-devel@nongnu.org; Sat, 21 Mar 2020 10:41:41 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1jFfJi-0007M5-BX for qemu-devel@nongnu.org; Sat, 21 Mar 2020 10:41:40 -0400 Received: from us-smtp-delivery-74.mimecast.com ([216.205.24.74]:51732) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1jFfJi-0007Lm-7y for qemu-devel@nongnu.org; Sat, 21 Mar 2020 10:41:38 -0400 Received: from mail-ed1-f69.google.com (mail-ed1-f69.google.com [209.85.208.69]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-445-DEzj9Qg3PlWiDPks3I-vTQ-1; Sat, 21 Mar 2020 10:41:34 -0400 Received: by mail-ed1-f69.google.com with SMTP id b100so7621968edf.15 for ; Sat, 21 Mar 2020 07:41:34 -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 a32sm603046edf.46.2020.03.21.07.41.30 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 21 Mar 2020 07:41:32 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1584801698; 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=kQDd9EbUfb0uuK6iIsTzZMSp5qbZytglJrEh2QYroHU=; b=X5DWlbPA32zOoZTe9yhVtJqQr5j5lfZaeugrncoTuhfkDfRcpkZzyNPZrBaEqVySp6BrBT e2EVszv+80dMNGj5Cr11CYCM6JkqkZuxgCQ+RTl/knvYbboBT1wwLuJ50yJugnKDffL7nA +C5HLnB6QMb6kTocUkvK1YfNXWwrK5k= X-MC-Unique: DEzj9Qg3PlWiDPks3I-vTQ-1 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=7jHPzgLUxabSngeicFYbktzokTE6KbRJJJ5XQsCuGXA=; b=jxi36Zjh290vVPqC1jxJsS7AyrI9N2ZB+gXm9D3whCtq+46YwBCEuj0xjNbwXLeZJs oN/1XczXsVNIU5eCJBDRSFmwR8COVMBzm1WRlmqAfWjTvdBfDaXIyRqXzu0c18WAdnGv 6ixI++IxrW/Tu0z55Np0/P+8mCJuw89h4JP6amf7RAxLUky3F7Glz0VJc9eXmxyHI3OM anX1NnDaFMboJtAAsTgfudvWOgCqg4H5ji8YBrAvtq52aaFEtxbh7xB6J5WA6TqF24uL xoTzcT71RsknAIyStgCmPcVyKRWAbdgFXMfq+vNlt8/dNxoZztde0RBeyA2wzCcAhqq6 6fQA== X-Gm-Message-State: ANhLgQ0jAEbF1LcRBRDUseKsrUQseAydtGJn40JKaaUqos20eSdkxuz1 PN5oMitkN0TqyeNZLlbPxQ+oViTplbvM1cO7InvJpfhJEQ3P9ZHED7zYeUMoS75tPk6c211Y6/x c34eD7R6zvsC8s0c= X-Received: by 2002:a17:906:7007:: with SMTP id n7mr13189133ejj.108.1584801693281; Sat, 21 Mar 2020 07:41:33 -0700 (PDT) X-Google-Smtp-Source: ADFU+vsksJysO+mxl+t+W2X01D8GMrkrubmik0/M6jdDivq40kM5YY8jnEGED6sR24r5kt8kIt2ovg== X-Received: by 2002:a17:906:7007:: with SMTP id n7mr13189101ejj.108.1584801693035; Sat, 21 Mar 2020 07:41:33 -0700 (PDT) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Subject: [PATCH-for-5.0 v2 03/11] hw/i2c/pm_smbus: Remove dead assignment Date: Sat, 21 Mar 2020 15:41:02 +0100 Message-Id: <20200321144110.5010-4-philmd@redhat.com> X-Mailer: git-send-email 2.21.1 In-Reply-To: <20200321144110.5010-1-philmd@redhat.com> References: <20200321144110.5010-1-philmd@redhat.com> MIME-Version: 1.0 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 216.205.24.74 X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Fam Zheng , Peter Maydell , "Michael S. Tsirkin" , Mark Cave-Ayland , qemu-block@nongnu.org, qemu-trivial@nongnu.org, Markus Armbruster , =?UTF-8?q?Herv=C3=A9=20Poussineau?= , Joel Stanley , Michael Tokarev , Alistair Francis , qemu-arm@nongnu.org, =?UTF-8?q?C=C3=A9dric=20Le=20Goater?= , John Snow , David Gibson , Kevin Wolf , Andrew Jeffery , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Laurent Vivier , Max Reitz , Igor Mitsyanko , qemu-ppc@nongnu.org, Paolo Bonzini Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) Content-Type: text/plain; charset="utf-8"; text/plain; charset="utf-8" Fix warning reported by Clang static code analyzer: CC hw/i2c/pm_smbus.o hw/i2c/pm_smbus.c:187:17: warning: Value stored to 'ret' is never read ret =3D 0; ^ ~ Reported-by: Clang Static Analyzer Signed-off-by: Philippe Mathieu-Daud=C3=A9 Reviewed-by: Alistair Francis --- hw/i2c/pm_smbus.c | 1 - 1 file changed, 1 deletion(-) diff --git a/hw/i2c/pm_smbus.c b/hw/i2c/pm_smbus.c index 36994ff585..4728540c37 100644 --- a/hw/i2c/pm_smbus.c +++ b/hw/i2c/pm_smbus.c @@ -184,7 +184,6 @@ static void smb_transaction(PMSMBus *s) s->smb_stat |=3D STS_HOST_BUSY | STS_BYTE_DONE; s->smb_data[0] =3D s->smb_blkdata; s->smb_index =3D 0; - ret =3D 0; } goto out; } --=20 2.21.1 From nobody Fri May 3 06:16:17 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1584802146; cv=none; d=zohomail.com; s=zohoarc; b=XNruhhrQ+TK56u6MZ2WAo4UymzwzxTKWOmEd9/C8c0eVmgG8PTp+Hg/pUVy88YJgKbVvuBQGYfz5v5hWWqN5UBPD82VcG/pxbawqem+s8hfqRu9Ftx+CJkQKjBhLXiAsmYAVhmeHcZnsUXRWLdGCg3jlz7Cj8I6a1uZnpPYkKJQ= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1584802146; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=HG9aIClnSQgwbfwrNWlQigZ+p9jo+t2veKUaX85pzII=; b=VS6OZ6d3jZIrvfysPmZDeWYiTPSE3/9S/r/CH51jArNnzZH0VEJdFllDeYS6rzYFjMZX/W7Tr2L1sNnQ2X6F6Th2n8b49VtSex8wwRgREN5rczvYDNAEnYtz7IoiR4EbhoIMB+BhqPcuobms/CMZ1SjLXhRxc/ZVVMVY155T8FM= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1584802146450523.1789760461743; Sat, 21 Mar 2020 07:49:06 -0700 (PDT) Received: from localhost ([::1]:37728 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jFfQu-0007fG-W2 for importer@patchew.org; Sat, 21 Mar 2020 10:49:05 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:59831) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jFfJo-00058A-55 for qemu-devel@nongnu.org; Sat, 21 Mar 2020 10:41:45 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1jFfJn-0007On-1T for qemu-devel@nongnu.org; Sat, 21 Mar 2020 10:41:44 -0400 Received: from us-smtp-delivery-74.mimecast.com ([216.205.24.74]:44217) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1jFfJm-0007OP-T0 for qemu-devel@nongnu.org; Sat, 21 Mar 2020 10:41:42 -0400 Received: from mail-wm1-f71.google.com (mail-wm1-f71.google.com [209.85.128.71]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-11-gvao1BEFNta2hZ19pTJemg-1; Sat, 21 Mar 2020 10:41:40 -0400 Received: by mail-wm1-f71.google.com with SMTP id h203so2403826wme.2 for ; Sat, 21 Mar 2020 07:41:40 -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 a13sm14020382wrh.80.2020.03.21.07.41.37 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 21 Mar 2020 07:41:38 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1584801702; 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=HG9aIClnSQgwbfwrNWlQigZ+p9jo+t2veKUaX85pzII=; b=alEv05n2sfcCenreaQ42B7wM3I9K2QyGTYZ/MOk7pImV/CRtija0xP0/vTgOt924/374W/ hjzjKpX3p9ZcA4DNLwdbhllifUP3ywBB28RsAa8H1xW0BeLH4ckw7OrvOTki6Q1JQJJKos aUSHudgDfdfkUbKKzOpK4AOInkioVWg= X-MC-Unique: gvao1BEFNta2hZ19pTJemg-1 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=Eqn1OJZAYDlLgDc90kBVx1WWSAviOqkIwIwDScG0wiQ=; b=T4ixOD9XaNTVwIGkbsAKSe/DCjD8xqtUHmb5B5A8dFcwPurBQep7DSTD5OPNCsgsAX DkdYtT1ARv4YNe55xqnbCXYQoDyinZLYWFF0CReMtCIIhvwEmt1fuTEgt1ULw1Vp8fw0 QzVgE938R7hjDTVHvaX5wlAgdBYkhO3X/q4qJxz4rE9X2KNwsbFHpepL30d3C8Mtg4Cx 46DxGIlAK+yrYAlX/c8tZC3yAyNCdae4TsoW0Hdb/tebUB99uh3pQeojufjL02kXl3Yj KYaaXuCD+xPdQUJ/VxKYRPEf6kXfc5frSnObbUG+ZPDGVexhjwiwKat55bo1eNncHk84 izIA== X-Gm-Message-State: ANhLgQ2ZoM3msB59pFjDI63LC2N1lepYfIvxc/pHnIGj+EPffCjd9QEg 7Xho7CPCSzRYswxIybxk5zrckAyFrqH2jYB+jwI7tvWu0EYqZ6T2YmNXEHGLsr2M5lEHkOpsKZP 1f9qs1jBOXwCQO+w= X-Received: by 2002:a05:600c:4145:: with SMTP id h5mr16372107wmm.3.1584801699580; Sat, 21 Mar 2020 07:41:39 -0700 (PDT) X-Google-Smtp-Source: ADFU+vsFAJVC1HBS34XteUQ0Qhlp+mZ6lovZPo5MIfUGGv+y3kPDMfyEF1bRg2/TCyRoOapzMf1fsQ== X-Received: by 2002:a05:600c:4145:: with SMTP id h5mr16372067wmm.3.1584801699378; Sat, 21 Mar 2020 07:41:39 -0700 (PDT) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Subject: [PATCH-for-5.0 v2 04/11] hw/input/adb-kbd: Remove dead assignment Date: Sat, 21 Mar 2020 15:41:03 +0100 Message-Id: <20200321144110.5010-5-philmd@redhat.com> X-Mailer: git-send-email 2.21.1 In-Reply-To: <20200321144110.5010-1-philmd@redhat.com> References: <20200321144110.5010-1-philmd@redhat.com> MIME-Version: 1.0 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 216.205.24.74 X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Fam Zheng , Peter Maydell , "Michael S. Tsirkin" , Mark Cave-Ayland , qemu-block@nongnu.org, qemu-trivial@nongnu.org, Markus Armbruster , =?UTF-8?q?Herv=C3=A9=20Poussineau?= , Joel Stanley , Michael Tokarev , Alistair Francis , qemu-arm@nongnu.org, =?UTF-8?q?C=C3=A9dric=20Le=20Goater?= , John Snow , David Gibson , Kevin Wolf , Andrew Jeffery , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Laurent Vivier , Max Reitz , Igor Mitsyanko , qemu-ppc@nongnu.org, Paolo Bonzini Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) Content-Type: text/plain; charset="utf-8"; text/plain; charset="utf-8" Since commit 5a1f49718 the 'olen' variable is not really used. Remove it to fix a warning reported by Clang static code analyzer: CC hw/input/adb-kbd.o hw/input/adb-kbd.c:200:5: warning: Value stored to 'olen' is never read olen =3D 0; ^ ~ Fixes: 5a1f49718 (adb: add support for QKeyCode) Reported-by: Clang Static Analyzer Suggested-by: BALATON Zoltan Signed-off-by: Philippe Mathieu-Daud=C3=A9 Acked-by: David Gibson --- v2: Remove 'olen' (Zoltan) --- hw/input/adb-kbd.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/hw/input/adb-kbd.c b/hw/input/adb-kbd.c index 0ba8207589..a6d5c9b7c9 100644 --- a/hw/input/adb-kbd.c +++ b/hw/input/adb-kbd.c @@ -195,9 +195,7 @@ static int adb_kbd_poll(ADBDevice *d, uint8_t *obuf) { KBDState *s =3D ADB_KEYBOARD(d); int keycode; - int olen; =20 - olen =3D 0; if (s->count =3D=3D 0) { return 0; } @@ -216,7 +214,6 @@ static int adb_kbd_poll(ADBDevice *d, uint8_t *obuf) if (keycode =3D=3D 0x7f) { obuf[0] =3D 0x7f; obuf[1] =3D 0x7f; - olen =3D 2; } else { obuf[0] =3D keycode; /* NOTE: the power key key-up is the two byte sequence 0xff 0xff; @@ -224,10 +221,9 @@ static int adb_kbd_poll(ADBDevice *d, uint8_t *obuf) * byte, but choose not to bother. */ obuf[1] =3D 0xff; - olen =3D 2; } =20 - return olen; + return 2; } =20 static int adb_kbd_request(ADBDevice *d, uint8_t *obuf, --=20 2.21.1 From nobody Fri May 3 06:16:17 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1584801964; cv=none; d=zohomail.com; s=zohoarc; b=cKB/R7AuS4IgIH3fK598OeJWGN6UMAvPHCCzli5kADo3EvSDGo2PoaozPovkZ/zSUrgxlb7cVFAOCuk7T94JBULvlhzIHBX61+d4S4MZz+nFz2PRywDSUbwjAN1yzvMW7QLFjx4nidrlGBY85HSsvlwku+Rsyq3k+ig9oH2dhUc= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1584801964; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=XvtpmJoV32BEyOe596XwKOYG0GxD3I0LNs6dD0KNAUs=; b=LHNacNIr0V7YThL8AQYG+48I7BvfHFBcaM6AkxpHim2CwG09+0fQQhA8EwZGzSP3ODispMgbp2lVIgJxEW5Io/A2iUFdZhMuGXlo9h4J50RPpJA+w7xtwGnyDbGqpG22qnYU+o61uN9p6eXn3esG9ozuQj1f4dUvchRb3n1QG8Q= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1584801964885107.43240978340441; Sat, 21 Mar 2020 07:46:04 -0700 (PDT) Received: from localhost ([::1]:37668 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jFfNz-0002mi-LT for importer@patchew.org; Sat, 21 Mar 2020 10:46:03 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:59897) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jFfJu-0005Q0-NL for qemu-devel@nongnu.org; Sat, 21 Mar 2020 10:41:51 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1jFfJt-0007V9-Kt for qemu-devel@nongnu.org; Sat, 21 Mar 2020 10:41:50 -0400 Received: from us-smtp-delivery-74.mimecast.com ([63.128.21.74]:24366) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1jFfJt-0007Uv-HN for qemu-devel@nongnu.org; Sat, 21 Mar 2020 10:41:49 -0400 Received: from mail-wr1-f71.google.com (mail-wr1-f71.google.com [209.85.221.71]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-460-D54etfosOv26yJD7_MCgDg-1; Sat, 21 Mar 2020 10:41:47 -0400 Received: by mail-wr1-f71.google.com with SMTP id i18so4352266wrx.17 for ; Sat, 21 Mar 2020 07:41:47 -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 n2sm14551205wro.25.2020.03.21.07.41.43 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 21 Mar 2020 07:41:45 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1584801709; 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=XvtpmJoV32BEyOe596XwKOYG0GxD3I0LNs6dD0KNAUs=; b=Cwt4HIDO8AQsqVGCL3OLnJGOmupuZxiZ0aJW78aOXREVrDGYFHxksKyvlkq1RR2PmXU7Ce fsUfTqRXZ1cExln8I5oIhI7VC3f9lZkDizbLThIVxorKQmpQAVhNkXn82S2bG8E+KJWS2o KEkL4vfFVrMNq4e2BWpueWxoHgyy5uo= X-MC-Unique: D54etfosOv26yJD7_MCgDg-1 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=bL5NUrmTjbHjm3pvKXbJpPZgk/5XIoNG4lJHv7ZuRaU=; b=SIz6Wz4MPoUqU6OUWVbZ0hWrSHE6PkajIxljV95mVclH4RhY0x8YhVys6O5HTBI25V 6BzXtihMVUKUZcz1PFZOAF5tgWdPerSnsoyuIpvbMa1ISA+jXPVyRSUbLPQjBjaXX7X6 niKGB6FHzHNSI+u2CKoSHw6ddKI1d/NrneXnG6gR3h+m8hzrZ/Bh4lzYleSy1SVGmbax UFhWFZ3tioWDYu/mUWqPvwJdCFVP9exXWCysxvqCydGl4JQci75a2Jbb5IWJklwLa6A1 tx7R+g+FguVRXAGtIZ3bo9dJRTMmCdZ9MhFdTUzR37WxawuOkgPfi7hsF8mSBLdRKCR+ 093A== X-Gm-Message-State: ANhLgQ2YZPR6rpEDliSwN6/fHbeYNgFSC0HL1fmU6M9gU+b+gUFr7aTA +zF7bvkOZA8vduIpHYCk0nnuwvxxaLzbncz/H8YTm472yt7ph9R7PILRPJiuthzY+wM9zQSDc5l rBghAaNYajRjovzA= X-Received: by 2002:a7b:c5d9:: with SMTP id n25mr17193376wmk.160.1584801705931; Sat, 21 Mar 2020 07:41:45 -0700 (PDT) X-Google-Smtp-Source: ADFU+vvPBABnTVrFLPi9F6uhCW5QPfP0PaTUxHoC+sJfC9KClGy5HdXjRGO23/0BW9pONNYT7mVwuA== X-Received: by 2002:a7b:c5d9:: with SMTP id n25mr17193337wmk.160.1584801705724; Sat, 21 Mar 2020 07:41:45 -0700 (PDT) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Subject: [PATCH-for-5.0 v2 05/11] hw/ide/sii3112: Remove dead assignment Date: Sat, 21 Mar 2020 15:41:04 +0100 Message-Id: <20200321144110.5010-6-philmd@redhat.com> X-Mailer: git-send-email 2.21.1 In-Reply-To: <20200321144110.5010-1-philmd@redhat.com> References: <20200321144110.5010-1-philmd@redhat.com> MIME-Version: 1.0 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com 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: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Fam Zheng , Peter Maydell , "Michael S. Tsirkin" , Mark Cave-Ayland , qemu-block@nongnu.org, qemu-trivial@nongnu.org, Markus Armbruster , =?UTF-8?q?Herv=C3=A9=20Poussineau?= , Joel Stanley , Michael Tokarev , Alistair Francis , qemu-arm@nongnu.org, =?UTF-8?q?C=C3=A9dric=20Le=20Goater?= , John Snow , David Gibson , Kevin Wolf , Andrew Jeffery , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Laurent Vivier , Max Reitz , Igor Mitsyanko , qemu-ppc@nongnu.org, Paolo Bonzini Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) Content-Type: text/plain; charset="utf-8"; text/plain; charset="utf-8" Fix warning reported by Clang static code analyzer: CC hw/ide/sii3112.o hw/ide/sii3112.c:204:9: warning: Value stored to 'val' is never read val =3D 0; ^ ~ Fixes: a9dd6604 Reported-by: Clang Static Analyzer Reviewed-by: BALATON Zoltan Signed-off-by: Philippe Mathieu-Daud=C3=A9 Acked-by: John Snow --- v2: Fix the correct function (Aleksandar review) --- hw/ide/sii3112.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/hw/ide/sii3112.c b/hw/ide/sii3112.c index 06605d7af2..b2ff6dd6d9 100644 --- a/hw/ide/sii3112.c +++ b/hw/ide/sii3112.c @@ -42,7 +42,7 @@ static uint64_t sii3112_reg_read(void *opaque, hwaddr add= r, unsigned int size) { SiI3112PCIState *d =3D opaque; - uint64_t val =3D 0; + uint64_t val; =20 switch (addr) { case 0x00: @@ -126,6 +126,7 @@ static uint64_t sii3112_reg_read(void *opaque, hwaddr a= ddr, break; default: val =3D 0; + break; } trace_sii3112_read(size, addr, val); return val; @@ -201,7 +202,7 @@ static void sii3112_reg_write(void *opaque, hwaddr addr, d->regs[1].sien =3D (val >> 16) & 0x3eed; break; default: - val =3D 0; + break; } } =20 --=20 2.21.1 From nobody Fri May 3 06:16:17 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1584802067; cv=none; d=zohomail.com; s=zohoarc; b=AklmXibTxrZcR3aL14scxShvqCTxVD+nEzxwh5C56H1OnW8/PODj67FFKQgRoXVfNnmePm70AI7vqV8XK5dVDyTEi++pZs12dNSHDxLNuSIk6ZLGGuKcl63nSvYXRX7q6BH4CU8jZ+OXrg/QcK2SrLh299XsYZ+ub4wfcP/Qaew= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1584802067; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=aNR2u2S6oJHTNfAafS+3cPQs0kK7tiu5/JdDcxGLqd4=; b=Y6Aj0dWEzMsehEJv93M1jwihmTJcmTIBKlcknOP/ou6y1bYHslDcQU6YbQW6m1Qn+5iZdAU7ivkki+FyWfc8wkXytDHvVxfYDTTZ29pfKxGTIuzTpnt86MB4yiRaX8l+jgOe8jgE2PaxjLNcIbHc0QP13Yp9PSZz7B26e7Z0+cs= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1584802067077924.263446118191; Sat, 21 Mar 2020 07:47:47 -0700 (PDT) Received: from localhost ([::1]:37704 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jFfPd-0005X3-Ra for importer@patchew.org; Sat, 21 Mar 2020 10:47:45 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:59957) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jFfK0-0005Yu-LQ for qemu-devel@nongnu.org; Sat, 21 Mar 2020 10:41:58 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1jFfJz-0007Zl-Kc for qemu-devel@nongnu.org; Sat, 21 Mar 2020 10:41:56 -0400 Received: from us-smtp-delivery-74.mimecast.com ([63.128.21.74]:25476) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1jFfJz-0007ZL-GC for qemu-devel@nongnu.org; Sat, 21 Mar 2020 10:41:55 -0400 Received: from mail-wr1-f70.google.com (mail-wr1-f70.google.com [209.85.221.70]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-416-1mltPEi_MDKPWsG2tQ7e-w-1; Sat, 21 Mar 2020 10:41:53 -0400 Received: by mail-wr1-f70.google.com with SMTP id b11so4354747wru.21 for ; Sat, 21 Mar 2020 07:41:53 -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 l83sm12694424wmf.43.2020.03.21.07.41.49 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 21 Mar 2020 07:41:51 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1584801715; 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=J23Jpr+i+XZcnmyU70T26P+itVo75sFH0xtJPsj4P8ByWDSLHDix84VL5/eUCHN0XpT/1D Vnl/Q3mumgh+tYO6R/8c//nxTrfsJAUpNP+C60SFRW6P4drUhzs9oyNiQCNnZdyVUgTqZ2 2ZX88+sguFVbZp6qleecm9jqSdtXQ/c= X-MC-Unique: 1mltPEi_MDKPWsG2tQ7e-w-1 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=TGFgkEK+TcwdN96KXqKFwH/aOvkcscxu+SFIXNHfdRudWMkIQPtYgZAvAAd9pCm+Zx Ab/i5ne9PR2mTlD1fgbl1x4MnqmonALAV7dHM+DW9+jBRAJ723ipaaQ2ywAcgvLbjeqX oEO8nmPBDGWUtkK5NdlbWkwFrAsZI+JbEZqkYYCVmzrxhPqlZ4a22R4aJEI9Wh5XBdws GDZo3VpYJYyXK169zEKuvoEMW3UuZcqxDgwDMN+1T7Ee9EN9O7i7ab/VV2/Mk17Mr2Xf X1dx7Og0jNvWLCd9+aUe6yPr4mXSYd7jEep2V5zRLV6meaqrfmDv/tTrhNw4A7JVhS5H Lyxw== X-Gm-Message-State: ANhLgQ0uVe85fhdrTWCRkbQUnt4pN3tXU57su8TEXBzUDy6Z/huj90wg Ygql+f7+4auXorKcJkQxg2MokcfubZQC5fg9CEWMRjKGdSBEd2Y23BYM+y96cBz79FvMvLqurCh 8PP3TCt4hKFUtxXU= X-Received: by 2002:adf:a490:: with SMTP id g16mr17744341wrb.42.1584801712171; Sat, 21 Mar 2020 07:41:52 -0700 (PDT) X-Google-Smtp-Source: ADFU+vvcdshd1gb0Sq4YqL62+G+0WKhBXbND0XSvaVf2BglTV01faEbdjx+USFWF7c7rg/A6yGHbRQ== X-Received: by 2002:adf:a490:: with SMTP id g16mr17744313wrb.42.1584801711853; Sat, 21 Mar 2020 07:41:51 -0700 (PDT) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Subject: [PATCH-for-5.0 v2 06/11] hw/isa/i82378: Remove dead assignment Date: Sat, 21 Mar 2020 15:41:05 +0100 Message-Id: <20200321144110.5010-7-philmd@redhat.com> X-Mailer: git-send-email 2.21.1 In-Reply-To: <20200321144110.5010-1-philmd@redhat.com> References: <20200321144110.5010-1-philmd@redhat.com> MIME-Version: 1.0 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com 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: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Fam Zheng , Peter Maydell , "Michael S. Tsirkin" , Mark Cave-Ayland , qemu-block@nongnu.org, qemu-trivial@nongnu.org, Markus Armbruster , =?UTF-8?q?Herv=C3=A9=20Poussineau?= , Joel Stanley , Michael Tokarev , Alistair Francis , qemu-arm@nongnu.org, =?UTF-8?q?C=C3=A9dric=20Le=20Goater?= , John Snow , David Gibson , Kevin Wolf , Andrew Jeffery , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Laurent Vivier , Max Reitz , Igor Mitsyanko , qemu-ppc@nongnu.org, Paolo Bonzini Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) Content-Type: text/plain; charset="utf-8"; text/plain; charset="utf-8" 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 =3D isa_create_simple(isabus, "i82374"); ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Reported-by: Clang Static Analyzer Signed-off-by: Philippe Mathieu-Daud=C3=A9 Reviewed-by: Alistair Francis --- 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 =3D I82378(dev); uint8_t *pci_conf; ISABus *isabus; - ISADevice *isa; + ISADevice *pit; =20 pci_conf =3D 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); =20 /* 1 82C54 (pit) */ - isa =3D i8254_pit_init(isabus, 0x40, 0, NULL); + pit =3D i8254_pit_init(isabus, 0x40, 0, NULL); =20 /* speaker */ - pcspk_init(isabus, isa); + pcspk_init(isabus, pit); =20 /* 2 82C37 (dma) */ - isa =3D isa_create_simple(isabus, "i82374"); + isa_create_simple(isabus, "i82374"); } =20 static void i82378_init(Object *obj) --=20 2.21.1 From nobody Fri May 3 06:16:17 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1584802188; cv=none; d=zohomail.com; s=zohoarc; b=LehJTfkrFH7+jp7nYnVs3aANMsTzzE9zJkSeUKh2hQ+5QXcHyaDPGPVui952es+D5PpfAuzqevzV4hHhs057htx+KhHtFINDd4+MWHVlQKmzsm2OLwTnrbbyBzfo65ipzf9pC42JpSxgbOdRklUpFXCs6DrSt+2Rp0K9m0qMF1I= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1584802188; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=Wabz9ShZfSLuxIv0MTXDbxATC0FT6q8THWUJCXN/WkY=; b=fnif9RYBQBm2rD27Ld+w34h5JYZXxH//XW7wz9zFsGf1EMj9xeEkD4sj7fELwlm4LkAjacLSz7aspXwgFROkOT//DjnrBvIBEmL6R7YlbtFztG8oBaR3nBFW5MaYrKH4lrYcLa/ZsQU0lu7Fz9v+NZ0G3lkXEvzGkKzQvKV4Wu8= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1584802188352279.53717455560775; Sat, 21 Mar 2020 07:49:48 -0700 (PDT) Received: from localhost ([::1]:37736 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jFfRa-0008Mz-7c for importer@patchew.org; Sat, 21 Mar 2020 10:49:46 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:60010) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jFfK6-0005jT-KE for qemu-devel@nongnu.org; Sat, 21 Mar 2020 10:42:03 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1jFfK5-0007cm-Fk for qemu-devel@nongnu.org; Sat, 21 Mar 2020 10:42:02 -0400 Received: from us-smtp-delivery-74.mimecast.com ([216.205.24.74]:39494) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1jFfK5-0007cW-Be for qemu-devel@nongnu.org; Sat, 21 Mar 2020 10:42:01 -0400 Received: from mail-wr1-f71.google.com (mail-wr1-f71.google.com [209.85.221.71]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-459-kPHGW_RPPMSK83UAxrRCVQ-1; Sat, 21 Mar 2020 10:41:59 -0400 Received: by mail-wr1-f71.google.com with SMTP id w11so4360004wrp.20 for ; Sat, 21 Mar 2020 07:41:59 -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 l8sm12553155wmj.2.2020.03.21.07.41.55 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 21 Mar 2020 07:41:57 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1584801721; 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=Wabz9ShZfSLuxIv0MTXDbxATC0FT6q8THWUJCXN/WkY=; b=XZaZT9Kv1kzu7sGM8bfJcaa0BGUWav1tr2dRp9uLV4k/w2LxoFp5hsF5HStBV99vEw6Wey 7Z0joxoWn/asczC6AsCzFO4rhYt+3TdWJu/HOoSGJqJGms7rfH7frlBgT67M4u5H8lEje7 /2sw0Z5cBo1y5knW3KG6F/PbA6qa/9w= X-MC-Unique: kPHGW_RPPMSK83UAxrRCVQ-1 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=eDep/UAh9LxMQ+p+ZbiwORp8mGO979hnIy8cu0Ibo6A=; b=Xm6VtI2hdnrze/8QtMlErKhf8eGAtuTk7+ubMBdcocH0hYeODVp/PKmiuOFmonJr9V yhoO7HM/enVtyFwqO7F49yjV3PL0pc3ex5gsdMuatOpfJO3iJR8blrBLvHbQJjM5zQtd tMFfKROtoO5RNb+/WgQPCmhSwJivDVrgqqcJUinz6xVOXfhKh0yIjBbrtpC5zueuoBDi LeQxc1qPjE/E2s4NjEYwPKzRCmYO6Nwh2smiijN3MjXdNZbvp0GC7sROqFsK4BaZWYKR 980UTTI6sVWFvF8PAOWbYa/Rcx/nNO4yhKga9ZAPQ8wel06G6P6XWyGvKx+mdm8tdreX 8C6Q== X-Gm-Message-State: ANhLgQ3+MKXvUV3KGmkzM4y0q6FulobEM6K6TRwIiuPTgjahNSQDr6hs OdUVJe3PiCrWChhVIefnrhhKQYDdS8xe58tBvSgdvGmuEbv4ebeo1mRomWzF7FtB3mlyC9PmRFI /RQNzQgI/n/b4WVQ= X-Received: by 2002:adf:b307:: with SMTP id j7mr18622715wrd.128.1584801718379; Sat, 21 Mar 2020 07:41:58 -0700 (PDT) X-Google-Smtp-Source: ADFU+vtfnFMlK5o2AUliKihnwwfvHrClOE3oeCNEnuVDhJ9fRMly5LXyQNqsh5zSzzZ49D+7xGs/WA== X-Received: by 2002:adf:b307:: with SMTP id j7mr18622686wrd.128.1584801718221; Sat, 21 Mar 2020 07:41:58 -0700 (PDT) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Subject: [PATCH-for-5.0 v2 07/11] hw/gpio/aspeed_gpio: Remove dead assignment Date: Sat, 21 Mar 2020 15:41:06 +0100 Message-Id: <20200321144110.5010-8-philmd@redhat.com> X-Mailer: git-send-email 2.21.1 In-Reply-To: <20200321144110.5010-1-philmd@redhat.com> References: <20200321144110.5010-1-philmd@redhat.com> MIME-Version: 1.0 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 216.205.24.74 X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Fam Zheng , Peter Maydell , "Michael S. Tsirkin" , Mark Cave-Ayland , qemu-block@nongnu.org, qemu-trivial@nongnu.org, Markus Armbruster , =?UTF-8?q?Herv=C3=A9=20Poussineau?= , Joel Stanley , Michael Tokarev , Alistair Francis , qemu-arm@nongnu.org, =?UTF-8?q?C=C3=A9dric=20Le=20Goater?= , John Snow , David Gibson , Kevin Wolf , Andrew Jeffery , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Laurent Vivier , Max Reitz , Igor Mitsyanko , qemu-ppc@nongnu.org, Paolo Bonzini Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) Content-Type: text/plain; charset="utf-8"; text/plain; charset="utf-8" Fix warning reported by Clang static code analyzer: hw/gpio/aspeed_gpio.c:717:18: warning: Value stored to 'g_idx' during its= initialization is never read int set_idx, g_idx =3D *group_idx; ^~~~~ ~~~~~~~~~~ Reported-by: Clang Static Analyzer Signed-off-by: Philippe Mathieu-Daud=C3=A9 Reviewed-by: C=C3=A9dric Le Goater --- v2: Do not declare g_idx in for() (Zoltan) --- hw/gpio/aspeed_gpio.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hw/gpio/aspeed_gpio.c b/hw/gpio/aspeed_gpio.c index 41e11ea9b0..bd19db31f4 100644 --- a/hw/gpio/aspeed_gpio.c +++ b/hw/gpio/aspeed_gpio.c @@ -714,7 +714,7 @@ static void aspeed_gpio_write(void *opaque, hwaddr offs= et, uint64_t data, static int get_set_idx(AspeedGPIOState *s, const char *group, int *group_i= dx) { AspeedGPIOClass *agc =3D ASPEED_GPIO_GET_CLASS(s); - int set_idx, g_idx =3D *group_idx; + int set_idx, g_idx; =20 for (set_idx =3D 0; set_idx < agc->nr_gpio_sets; set_idx++) { const GPIOSetProperties *set_props =3D &agc->props[set_idx]; --=20 2.21.1 From nobody Fri May 3 06:16:17 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1584802303; cv=none; d=zohomail.com; s=zohoarc; b=H7jGJoq/Wj5wq+pBTK8Z4L1xpJgqfcvd3mz+ERRj49ZSOtYxaQo0gTKZ21opfBYHW47CUm9KfBWbx9/hn8OKuS2+CSMVB6VtK6GoOVMOqKZtzdoLLMbysWexvBoz4CuCZop5wA5TwRWwP8kIot5Gt84kU1rQ1BRbwRBD2GMR3lU= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1584802303; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=9RrFXtWXIAKlsNCj4fxVkxendU8386lJ6GdPQwHKuZc=; b=dXVyi+9v/nQ/B6yRDCK+T9KMB37WSDiQ5cJBmYVVNprUVZA4vuw4VFvxYIwO+klIX3R8rhpW1mafI7T5DG1xnML4SVLhr8wZnTxEz2f9i8YrZ7+HA3REO3G9x5bitnoGHVcAG+zHe2UEQUdNbTDJnAY1SdM/R0eHtbfluyYl1uk= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1584802303546530.7232771580566; Sat, 21 Mar 2020 07:51:43 -0700 (PDT) Received: from localhost ([::1]:37802 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jFfTS-0003Db-7F for importer@patchew.org; Sat, 21 Mar 2020 10:51:42 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:60097) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jFfKD-0005zd-7H for qemu-devel@nongnu.org; Sat, 21 Mar 2020 10:42:10 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1jFfKC-0007kd-4F for qemu-devel@nongnu.org; Sat, 21 Mar 2020 10:42:09 -0400 Received: from us-smtp-delivery-74.mimecast.com ([216.205.24.74]:41799) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1jFfKC-0007kB-0w for qemu-devel@nongnu.org; Sat, 21 Mar 2020 10:42:08 -0400 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-329-C50UbgSkOsidJhpJWYi03g-1; Sat, 21 Mar 2020 10:42:06 -0400 Received: by mail-wr1-f72.google.com with SMTP id u18so4345129wrn.11 for ; Sat, 21 Mar 2020 07:42:05 -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 q4sm15551202wmj.1.2020.03.21.07.42.02 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 21 Mar 2020 07:42:04 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1584801727; 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=9RrFXtWXIAKlsNCj4fxVkxendU8386lJ6GdPQwHKuZc=; b=LdobpIasVk/mGq71Gg1QdeBCwRKrrm1niUZ6GLVSiJ9Z18r4UZCIOGtPeyHhu+t6ExiwMX fnalkUeOSKQy7cNRZT3pDokp1S11JpwALrpaCQ8KDE1KXsxON0ejuqTCPPtzgUNpCyS9NP Sbd+l8bgPoXa5tSOEyB5MK2LfWX7zCA= X-MC-Unique: C50UbgSkOsidJhpJWYi03g-1 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=9gGzKQU/hca0N/HfH89YEyKKEwjuVATrynJmMDBqHuA=; b=mPsKqvcDseQpNkRiFgLRcB8e76i6PacO9kyB6AvDstf9QXUQEwBbptuBje5p9LgLI8 8s5QD8X3RS8X5j7ML8cA2MmZ1+YxSqKBRwlxeJvZxpeiExqKyy4yI3rtIveUF/tg1Pmg QoiyRmCGEVOhqfLniaOLVR8JS+nsXej01t69Ab40OF+NqAyXYB4SlT5FssTmvbfgDOJj 5mH2jJTkeVp1rxZ+OZke5VO0xhTw/1eqj68DYnngoG3tK/t6oUJ3jXU4QBzA5o4hkQlx ojqVv4J1RejewJRd7U2Vty9NsoExYeWjb0PrmYLRD3WQPtxh2hR832W/SC7wfsEb+nGE 2C4g== X-Gm-Message-State: ANhLgQ31qt21Md34DqaHYVHKe+6I2pjKtM0Lohc6dJceoD1Ln7rVlmW7 7LeL0SK7WwMy/CdwQPlpisgaVBmv/R9i3dQLO7b04Ic2kbDNtSk0yQJvsa9IRRZn//2esKtBQBH XILcWUbS/7BX0hCA= X-Received: by 2002:a1c:6146:: with SMTP id v67mr17275847wmb.78.1584801724863; Sat, 21 Mar 2020 07:42:04 -0700 (PDT) X-Google-Smtp-Source: ADFU+vsfqtX15MJ2p2JpJ/ffV8FYy1TWP7w2C2mrskH7qUQerNu6HNo96KA/QF3NJt2BvK9DYoTULg== X-Received: by 2002:a1c:6146:: with SMTP id v67mr17275807wmb.78.1584801724661; Sat, 21 Mar 2020 07:42:04 -0700 (PDT) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Subject: [PATCH-for-5.0 v2 08/11] hw/timer/exynos4210_mct: Remove dead assignments Date: Sat, 21 Mar 2020 15:41:07 +0100 Message-Id: <20200321144110.5010-9-philmd@redhat.com> X-Mailer: git-send-email 2.21.1 In-Reply-To: <20200321144110.5010-1-philmd@redhat.com> References: <20200321144110.5010-1-philmd@redhat.com> MIME-Version: 1.0 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 216.205.24.74 X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Fam Zheng , Peter Maydell , "Michael S. Tsirkin" , Mark Cave-Ayland , qemu-block@nongnu.org, qemu-trivial@nongnu.org, Markus Armbruster , =?UTF-8?q?Herv=C3=A9=20Poussineau?= , Joel Stanley , Michael Tokarev , Alistair Francis , qemu-arm@nongnu.org, =?UTF-8?q?C=C3=A9dric=20Le=20Goater?= , John Snow , David Gibson , Kevin Wolf , Andrew Jeffery , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Laurent Vivier , Max Reitz , Igor Mitsyanko , qemu-ppc@nongnu.org, Paolo Bonzini Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) Content-Type: text/plain; charset="utf-8"; text/plain; charset="utf-8" Fix warnings reported by Clang static code analyzer: hw/timer/exynos4210_mct.c:1370:9: warning: Value stored to 'index' is nev= er read index =3D GET_L_TIMER_CNT_REG_IDX(offset, lt_i); ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ hw/timer/exynos4210_mct.c:1399:9: warning: Value stored to 'index' is nev= er read index =3D GET_L_TIMER_CNT_REG_IDX(offset, lt_i); ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ hw/timer/exynos4210_mct.c:1441:9: warning: Value stored to 'index' is nev= er read index =3D GET_L_TIMER_CNT_REG_IDX(offset, lt_i); ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Reported-by: Clang Static Analyzer Signed-off-by: Philippe Mathieu-Daud=C3=A9 Reviewed-by: Alistair Francis --- hw/timer/exynos4210_mct.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/hw/timer/exynos4210_mct.c b/hw/timer/exynos4210_mct.c index 944120aea5..c0a25e71ec 100644 --- a/hw/timer/exynos4210_mct.c +++ b/hw/timer/exynos4210_mct.c @@ -1367,7 +1367,6 @@ static void exynos4210_mct_write(void *opaque, hwaddr= offset, =20 case L0_TCNTB: case L1_TCNTB: lt_i =3D GET_L_TIMER_IDX(offset); - index =3D GET_L_TIMER_CNT_REG_IDX(offset, lt_i); =20 /* * TCNTB is updated to internal register only after CNT expired. @@ -1396,7 +1395,6 @@ static void exynos4210_mct_write(void *opaque, hwaddr= offset, =20 case L0_ICNTB: case L1_ICNTB: lt_i =3D GET_L_TIMER_IDX(offset); - index =3D GET_L_TIMER_CNT_REG_IDX(offset, lt_i); =20 s->l_timer[lt_i].reg.wstat |=3D L_WSTAT_ICNTB_WRITE; s->l_timer[lt_i].reg.cnt[L_REG_CNT_ICNTB] =3D value & @@ -1438,7 +1436,6 @@ static void exynos4210_mct_write(void *opaque, hwaddr= offset, =20 case L0_FRCNTB: case L1_FRCNTB: lt_i =3D GET_L_TIMER_IDX(offset); - index =3D GET_L_TIMER_CNT_REG_IDX(offset, lt_i); =20 DPRINTF("local timer[%d] FRCNTB write %llx\n", lt_i, value); =20 --=20 2.21.1 From nobody Fri May 3 06:16:17 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1584802401; cv=none; d=zohomail.com; s=zohoarc; b=PkaONPCbq2+wD08C7HHRZpOsgP7UzxoI2lq6NcXgbXhdC1UyjwXZd9futHZBuwuDhcTcDWugSfrmWYjUVYmvn4Q2r/kf5OXvC56xCfnXfn2k67ZaLQmztAijQhMK99gkNmM0ra7udwRWi4miFwblp7DE7FeU7dEaxC6S28gTLzA= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1584802401; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=H2ZxNlM8IiHu0dxI+a0SAXUIREttoqtshJPpfqAJ9kA=; b=aohkE9Iz5JSX7yhSkaXOn6+Z/9dbFfQwVdCMmV77wE2cEn3zAQ3iqBRNGqPT3G1mMcJLpLDCloHb+6qj4Eaqbf5qmHW0w+gs/41BfleUGQoVu/slr5kOmJ2P4XQ8DF4ccSVxDXVxZfrA35vtnT2QJveuVTJS3fHmES/mLZ53Jyo= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1584802401825881.0250632751042; Sat, 21 Mar 2020 07:53:21 -0700 (PDT) Received: from localhost ([::1]:37820 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jFfV2-00055w-Fs for importer@patchew.org; Sat, 21 Mar 2020 10:53:20 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:60174) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jFfKM-0006Aj-3B for qemu-devel@nongnu.org; Sat, 21 Mar 2020 10:42:19 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1jFfKK-0007rV-8T for qemu-devel@nongnu.org; Sat, 21 Mar 2020 10:42:17 -0400 Received: from us-smtp-delivery-74.mimecast.com ([216.205.24.74]:20247) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1jFfKK-0007pK-0x for qemu-devel@nongnu.org; Sat, 21 Mar 2020 10:42:16 -0400 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-303-B1u0i1lzNCKnPkvXshnlOg-1; Sat, 21 Mar 2020 10:42:12 -0400 Received: by mail-wr1-f72.google.com with SMTP id u18so4345241wrn.11 for ; Sat, 21 Mar 2020 07:42:12 -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 k84sm13062950wmk.2.2020.03.21.07.42.08 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 21 Mar 2020 07:42:10 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1584801734; 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=H2ZxNlM8IiHu0dxI+a0SAXUIREttoqtshJPpfqAJ9kA=; b=CbQSYqP0divIhSx3ibw/eLW6mVLWzEcsCXp3CDlbsuxvdAn5N7yIqn4NnPD1eAoNgvinWv wKpoStnKFZyCNGxC6bD1I1Lu0QU8WetAPH0eBsWVoGTH54NncQ8QlFjRZyI0ay9el0ShKP qSGcdqhkyQ/oF4+kUHm8rpETUay+gUE= X-MC-Unique: B1u0i1lzNCKnPkvXshnlOg-1 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=860B2IkAp+GSKWrMYmt9BxqMmpnco8VZzzV9xEgKT/A=; b=FhqgbNF8LLuQEBE1hk/jsxgIxHMFeXx+l/lGJSGCKTC3xIvL2qh5g8t4GOaxPHVc76 6xzJqw77FNo3/EPPZnqXGPse8S1mlRccmcuAKbZlryr4Lb4GjD1lFgMgmjHGZroT2R6g Ply8rU36NIfOnFv4D8+rxF5IH9ckPPPeSOPeF1kKKtUbGsamNlMfp2rG+nuI2HLn42Y6 uFY96QWn1sO4y3EXEokJxhOJ86AhWFuMvPgvvcRS3+u2OrGvT9Q2VWi4Lbq4bxUHTp8c bOjBPFSMCqthcfN7aXC8lZS+juP45MM+NTNgf4uzytCYFufrk11hTaMhFj2wHBytTXKP JNig== X-Gm-Message-State: ANhLgQ0Chmio1wlO54FHQJYpvX3UDm+OLn6leAvxKgiitdIFr6SGHOM+ XLwYJA93TeLvSYVZrEdUXBD8LldYyjcy/6A2NF+yWB50wHHYMD9/j+Kqng2qnoemq9HlJ7F/718 gSomdBF2ktKKOCuM= X-Received: by 2002:a1c:5452:: with SMTP id p18mr17120531wmi.102.1584801731394; Sat, 21 Mar 2020 07:42:11 -0700 (PDT) X-Google-Smtp-Source: ADFU+vt4MZYkQzsDodB4rBr8kRt7DKKHOWwCJhHaZsSeyVB7oP3PGVEPm9D09+Ax6eoZkWA0FA03pA== X-Received: by 2002:a1c:5452:: with SMTP id p18mr17120502wmi.102.1584801731141; Sat, 21 Mar 2020 07:42:11 -0700 (PDT) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Subject: [PATCH-for-5.0 v2 09/11] hw/timer/stm32f2xx_timer: Remove dead assignment Date: Sat, 21 Mar 2020 15:41:08 +0100 Message-Id: <20200321144110.5010-10-philmd@redhat.com> X-Mailer: git-send-email 2.21.1 In-Reply-To: <20200321144110.5010-1-philmd@redhat.com> References: <20200321144110.5010-1-philmd@redhat.com> MIME-Version: 1.0 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 216.205.24.74 X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Fam Zheng , Peter Maydell , "Michael S. Tsirkin" , Mark Cave-Ayland , qemu-block@nongnu.org, qemu-trivial@nongnu.org, Markus Armbruster , =?UTF-8?q?Herv=C3=A9=20Poussineau?= , Joel Stanley , Michael Tokarev , Alistair Francis , qemu-arm@nongnu.org, =?UTF-8?q?C=C3=A9dric=20Le=20Goater?= , John Snow , David Gibson , Kevin Wolf , Andrew Jeffery , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Laurent Vivier , Max Reitz , Igor Mitsyanko , qemu-ppc@nongnu.org, Paolo Bonzini Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) Content-Type: text/plain; charset="utf-8"; text/plain; charset="utf-8" Fix warning reported by Clang static code analyzer: CC hw/timer/stm32f2xx_timer.o hw/timer/stm32f2xx_timer.c:225:9: warning: Value stored to 'value' is nev= er read value =3D timer_val; ^ ~~~~~~~~~ Reported-by: Clang Static Analyzer Signed-off-by: Philippe Mathieu-Daud=C3=A9 Reviewed-by: Alistair Francis --- hw/timer/stm32f2xx_timer.c | 1 - 1 file changed, 1 deletion(-) diff --git a/hw/timer/stm32f2xx_timer.c b/hw/timer/stm32f2xx_timer.c index 06ec8a02c2..ba8694dcd3 100644 --- a/hw/timer/stm32f2xx_timer.c +++ b/hw/timer/stm32f2xx_timer.c @@ -222,7 +222,6 @@ static void stm32f2xx_timer_write(void *opaque, hwaddr = offset, case TIM_PSC: timer_val =3D stm32f2xx_ns_to_ticks(s, now) - s->tick_offset; s->tim_psc =3D value & 0xFFFF; - value =3D timer_val; break; case TIM_CNT: timer_val =3D value; --=20 2.21.1 From nobody Fri May 3 06:16:17 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1584802291; cv=none; d=zohomail.com; s=zohoarc; b=dkSc2ZkanX+6g3G9L9kH3SCdoe5fDEdUgD7WXLfC1F0MHb6rjQGTkSr8+YXajQKcG9s6E+lVU8RdIozl9Iej9HFueZCeJdK9wdR/nEoDRQ0weLcfDo6AxzTwvbEOCbBKlDNcjYEB2BiKDCKR3yCELnQ6wT+noO5qadRHETZOu80= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1584802291; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=TG3vD6dCJich6pAeWRU+T1xBswh8CnNUpTlBwJ1yiQM=; b=cice7o165U98z05FMn8I7UWdHpbgtrhmaPpWMmZ+xbCEMFlHbVfYeOsXPzuBFBvRL8bZqcKPcfyWZexT41ZD5OeKxYg9IAA8WWCOd3mwU0XjpDvPhYlrybaCtF26DvUugvBocRmdnynfq0FabSFFTRFroLxxm4G+vKa+ZPP5Kqk= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1584802291018179.5309941244983; Sat, 21 Mar 2020 07:51:31 -0700 (PDT) Received: from localhost ([::1]:37800 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jFfTB-0002r8-Fs for importer@patchew.org; Sat, 21 Mar 2020 10:51:25 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:60233) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jFfKS-0006GQ-Aw for qemu-devel@nongnu.org; Sat, 21 Mar 2020 10:42:25 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1jFfKP-0007xV-TN for qemu-devel@nongnu.org; Sat, 21 Mar 2020 10:42:23 -0400 Received: from us-smtp-delivery-74.mimecast.com ([216.205.24.74]:35161) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1jFfKP-0007wT-Lt for qemu-devel@nongnu.org; Sat, 21 Mar 2020 10:42:21 -0400 Received: from mail-wr1-f71.google.com (mail-wr1-f71.google.com [209.85.221.71]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-59-t5f1oDRDOd24NVLSDon0sw-1; Sat, 21 Mar 2020 10:42:19 -0400 Received: by mail-wr1-f71.google.com with SMTP id w11so4360338wrp.20 for ; Sat, 21 Mar 2020 07:42:19 -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 k84sm13063251wmk.2.2020.03.21.07.42.15 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 21 Mar 2020 07:42:17 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1584801740; 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=TG3vD6dCJich6pAeWRU+T1xBswh8CnNUpTlBwJ1yiQM=; b=f73Fq9/MIQv8adz/ZgYmdwv/FqPikMBkNM4np1GwS6MkLvUUZeJQZOd0XVs0mhfgT50Az8 zCiPih4HsFYrlOOweUzR356hxUKHdymRGkdWuq1AXl0H8Xc+oCJP+S1K3O//K8qengtI1V xh4oOBv7KVBXAooiRqLrxmWWYEnChac= X-MC-Unique: t5f1oDRDOd24NVLSDon0sw-1 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=zAAolWyXSH1ZCqRxa+9EfzNPi+VU6uagizFc7cEyMYQ=; b=NdP4xVoJezNLcG4yNQVSmdtDRUnEENrFFzW6U4DRMOT/XLYxLuYxt2uTNwG/GUtqi1 +24IHzxl5fLPXfV8YpVAjYkLc5JEa42Oq8pYUYNXj5t+uvsHxgF/fi0ccAp92Amv2eSx Y6Yl4pPfQ8JmZgX2xA7xutap5wQ1ANq111ZESiEbKyFPVOa5bjvEpWCF1FGc61lruhsC 49fESKhjbo0LDqmFioVeI8BEQVVKh9GC8MzbqqVlSiwc9ik3STbKe9k8ERolWvNgGmMF q8G+InYooMhaRJ2JopO12V7ulmz5jOu+wpfhoo8W70CROeHHpjpDnP9p8lfQnWyopU71 sOYw== X-Gm-Message-State: ANhLgQ3JIX0dLSQ8HS2DlN8d0FlbaaCRneOcQN/Pc+cXT1QgSsic/SVw Znh7x3B3smZ+icDnUsj71PcIrlwqfVnPLJGBsJJPyEV+09pCT6zlD94wvmmoEtjFjke+290M9ph 0j+f5RyVWDffxzn0= X-Received: by 2002:a5d:6992:: with SMTP id g18mr18118308wru.426.1584801737792; Sat, 21 Mar 2020 07:42:17 -0700 (PDT) X-Google-Smtp-Source: ADFU+vsl+3ePkFRoRlIgn8f/HqRo7liy9CnmPsdS2QHY2gZeAqtjiG+Hn+C7e13XG+1vA7HdxTVxDA== X-Received: by 2002:a5d:6992:: with SMTP id g18mr18118265wru.426.1584801737585; Sat, 21 Mar 2020 07:42:17 -0700 (PDT) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Subject: [PATCH-for-5.0 v2 10/11] hw/timer/pxa2xx_timer: Add assertion to silent static analyzer warning Date: Sat, 21 Mar 2020 15:41:09 +0100 Message-Id: <20200321144110.5010-11-philmd@redhat.com> X-Mailer: git-send-email 2.21.1 In-Reply-To: <20200321144110.5010-1-philmd@redhat.com> References: <20200321144110.5010-1-philmd@redhat.com> MIME-Version: 1.0 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 216.205.24.74 X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Fam Zheng , Peter Maydell , "Michael S. Tsirkin" , Mark Cave-Ayland , qemu-block@nongnu.org, qemu-trivial@nongnu.org, Markus Armbruster , =?UTF-8?q?Herv=C3=A9=20Poussineau?= , Joel Stanley , Michael Tokarev , Alistair Francis , qemu-arm@nongnu.org, =?UTF-8?q?C=C3=A9dric=20Le=20Goater?= , John Snow , David Gibson , Kevin Wolf , Andrew Jeffery , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Laurent Vivier , Max Reitz , Igor Mitsyanko , qemu-ppc@nongnu.org, Paolo Bonzini Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) Content-Type: text/plain; charset="utf-8"; text/plain; charset="utf-8" pxa2xx_timer_tick4() takes an opaque pointer, then calls pxa2xx_timer_update4(), so the static analyzer can not verify that the 'n < 8': 425 static void pxa2xx_timer_tick4(void *opaque) 426 { 427 PXA2xxTimer4 *t =3D (PXA2xxTimer4 *) opaque; 428 PXA2xxTimerInfo *i =3D (PXA2xxTimerInfo *) t->tm.info; 429 430 pxa2xx_timer_tick(&t->tm); 433 if (t->control & (1 << 6)) 434 pxa2xx_timer_update4(i, qemu_clock_get_ns(QEMU_CLOCK_VIRTUAL)= , t->tm.num - 4); 135 static void pxa2xx_timer_update4(void *opaque, uint64_t now_qemu, int= n) 136 { 137 PXA2xxTimerInfo *s =3D (PXA2xxTimerInfo *) opaque; 140 static const int counters[8] =3D { 0, 0, 0, 0, 4, 4, 6, 6 }; 142 143 if (s->tm4[n].control & (1 << 7)) 144 counter =3D n; 145 else 146 counter =3D counters[n]; Add an assert() to give the static analyzer a hint, this fixes a warning reported by Clang static code analyzer: CC hw/timer/pxa2xx_timer.o hw/timer/pxa2xx_timer.c:146:17: warning: Assigned value is garbage or und= efined counter =3D counters[n]; ^ ~~~~~~~~~~~ Reported-by: Clang Static Analyzer Signed-off-by: Philippe Mathieu-Daud=C3=A9 Reviewed-by: Alistair Francis --- hw/timer/pxa2xx_timer.c | 1 + 1 file changed, 1 insertion(+) diff --git a/hw/timer/pxa2xx_timer.c b/hw/timer/pxa2xx_timer.c index cd172cc1e9..944c165889 100644 --- a/hw/timer/pxa2xx_timer.c +++ b/hw/timer/pxa2xx_timer.c @@ -140,6 +140,7 @@ static void pxa2xx_timer_update4(void *opaque, uint64_t= now_qemu, int n) static const int counters[8] =3D { 0, 0, 0, 0, 4, 4, 6, 6 }; int counter; =20 + assert(n < ARRAY_SIZE(counters)); if (s->tm4[n].control & (1 << 7)) counter =3D n; else --=20 2.21.1 From nobody Fri May 3 06:16:17 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1584802141; cv=none; d=zohomail.com; s=zohoarc; b=NiIrjrD+HJ+K9uF+PFqaLVPAR6GXgz8A/Xs7sG5OVTnxHLGAjHa5+obckRltAWgQD5NbVbrCZOiGr0QtD3t8iH5mPrDDhOinutKzzkTMI23direw1I29eTm4NNjgunwQLu3uUKY/18MT0iv/hOobXftMBhuvMx4A6S3Vhq8yw+s= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1584802141; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=GEdgbG/luCssALBIqG8TygafayDXTkEa0M3aN0ohCNI=; b=MlWrWh/o1hEVge9fwDE+rHjc/9hXsKOFYeLfKppGNP+Jwc1zrubLSrfWSL0d+rYM5GU+g1ot1eJsbF1u7wUukYeGTx4L2iA+BbEihrZ6TsSy49Uwwq8liG14Mje3ZKJ4mmi3Onm48VzVlK/4IINjcP3LClu/WkYGESHFRLSuwUY= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1584802141177536.4901877755766; Sat, 21 Mar 2020 07:49:01 -0700 (PDT) Received: from localhost ([::1]:37727 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jFfQp-0007Vr-JH for importer@patchew.org; Sat, 21 Mar 2020 10:48:59 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:60307) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jFfKX-0006Qp-UY for qemu-devel@nongnu.org; Sat, 21 Mar 2020 10:42:31 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1jFfKV-000859-Uw for qemu-devel@nongnu.org; Sat, 21 Mar 2020 10:42:29 -0400 Received: from us-smtp-delivery-74.mimecast.com ([63.128.21.74]:60308) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1jFfKV-00084m-RO for qemu-devel@nongnu.org; Sat, 21 Mar 2020 10:42:27 -0400 Received: from mail-wr1-f69.google.com (mail-wr1-f69.google.com [209.85.221.69]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-352-Luqkr_GVP6GEeIhEFks8Jw-1; Sat, 21 Mar 2020 10:42:25 -0400 Received: by mail-wr1-f69.google.com with SMTP id v7so4414691wrp.0 for ; Sat, 21 Mar 2020 07:42:25 -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 v7sm13472822wml.18.2020.03.21.07.42.21 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 21 Mar 2020 07:42:23 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1584801747; 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=GEdgbG/luCssALBIqG8TygafayDXTkEa0M3aN0ohCNI=; b=cIp5SluX0y6SYadZfm4elMxH1AqbOHUsOt7nvn8wQPeAXviD+qC2AmiV0llvNvEJbwLesG pt7DE/6RdaHQ51569nra/GvikVAyv1kftzz7fum9098KQKmvF1E5DUYOkXbyPanq/JN+7E KUGrWDZ4+71AhhBv/StlS9nQF+ifxoE= X-MC-Unique: Luqkr_GVP6GEeIhEFks8Jw-1 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=RNYtNktAqDdDAs+EFJozo/fN2JmmaPRaAB7IeiBu7pw=; b=p+bYtzVNOWkHTXvsHJEyMFrEM+4HN2MxUN9+M5ysX9cdVG+FSeOSfuFfo6bsftTi9+ mAhwrcvRF781VHtpKQWisBuiHOxQhK78esNlHieOkw6xgP4cd3RkYeI6rERJZZppU94B 9QgfDKYNMzN9S+hhKUWqUh4gGwMYJJWQ+WC5+XV48ukPs8cSLT7qIg+G4pXWknowN4Cy WR31f3AkJWGWzLMNS5TSlK4Xf8QdePthMo0iGbG19S80rP5mj7cm2FLhUIWXz+PdiEbI hFlW8wtqtfR8dAo5UEdydMk/Vgm4GGVWQqlSXqKPX3UECXyR+LsShyig14qm0gFysRVe 3Kdw== X-Gm-Message-State: ANhLgQ1AgYoTeGqlV0PQbQW/2iKkpRAb5oI4LniYHKQnYMcXvL/dYfEs qLPRMxZC0R8nifGeCmBfLKXCBjEfeKpuE/Ebnt+jtlaEYyM41gscSzawUU+Gby0dWFuKWzJO3D3 4PER80HdVwWLhNvM= X-Received: by 2002:a1c:5502:: with SMTP id j2mr16751344wmb.93.1584801744191; Sat, 21 Mar 2020 07:42:24 -0700 (PDT) X-Google-Smtp-Source: ADFU+vsKPDyLXi8pa8eig6PFPmkwgoDRyetmzS36AEYiO2EqK8vpko5c519XDDmnXRQ0gyQY3H9VPw== X-Received: by 2002:a1c:5502:: with SMTP id j2mr16751309wmb.93.1584801743946; Sat, 21 Mar 2020 07:42:23 -0700 (PDT) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Subject: [PATCH-for-5.0 v2 11/11] hw/scsi/esp-pci: Remove dead assignment Date: Sat, 21 Mar 2020 15:41:10 +0100 Message-Id: <20200321144110.5010-12-philmd@redhat.com> X-Mailer: git-send-email 2.21.1 In-Reply-To: <20200321144110.5010-1-philmd@redhat.com> References: <20200321144110.5010-1-philmd@redhat.com> MIME-Version: 1.0 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com 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: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Fam Zheng , Peter Maydell , "Michael S. Tsirkin" , Mark Cave-Ayland , qemu-block@nongnu.org, qemu-trivial@nongnu.org, Markus Armbruster , =?UTF-8?q?Herv=C3=A9=20Poussineau?= , Joel Stanley , Michael Tokarev , Alistair Francis , qemu-arm@nongnu.org, =?UTF-8?q?C=C3=A9dric=20Le=20Goater?= , John Snow , David Gibson , Kevin Wolf , Andrew Jeffery , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Laurent Vivier , Max Reitz , Igor Mitsyanko , qemu-ppc@nongnu.org, Paolo Bonzini Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) Content-Type: text/plain; charset="utf-8"; text/plain; charset="utf-8" Fix warning reported by Clang static code analyzer: CC hw/scsi/esp-pci.o hw/scsi/esp-pci.c:198:9: warning: Value stored to 'size' is never read size =3D 4; ^ ~ Reported-by: Clang Static Analyzer Signed-off-by: Philippe Mathieu-Daud=C3=A9 --- hw/scsi/esp-pci.c | 1 - 1 file changed, 1 deletion(-) diff --git a/hw/scsi/esp-pci.c b/hw/scsi/esp-pci.c index d5a1f9e017..2e6cc07d4e 100644 --- a/hw/scsi/esp-pci.c +++ b/hw/scsi/esp-pci.c @@ -195,7 +195,6 @@ static void esp_pci_io_write(void *opaque, hwaddr addr, val <<=3D shift; val |=3D current & ~(mask << shift); addr &=3D ~3; - size =3D 4; } =20 if (addr < 0x40) { --=20 2.21.1