From patchwork Sat Feb 15 16:15:55 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= X-Patchwork-Id: 1238577 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=nongnu.org (client-ip=209.51.188.17; helo=lists.gnu.org; envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=redhat.com Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=redhat.com header.i=@redhat.com header.a=rsa-sha256 header.s=mimecast20190719 header.b=YNlpnn41; dkim-atps=neutral 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 ozlabs.org (Postfix) with ESMTPS id 48Kb3T5wpnz9sP7 for ; Sun, 16 Feb 2020 03:16:35 +1100 (AEDT) Received: from localhost ([::1]:52370 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1j307L-0002A7-DE for incoming@patchwork.ozlabs.org; Sat, 15 Feb 2020 11:16:31 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:47657) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1j306w-00029q-Rf for qemu-devel@nongnu.org; Sat, 15 Feb 2020 11:16:07 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1j306v-0005bA-NS for qemu-devel@nongnu.org; Sat, 15 Feb 2020 11:16:06 -0500 Received: from us-smtp-delivery-1.mimecast.com ([205.139.110.120]:43295 helo=us-smtp-1.mimecast.com) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1j306v-0005Zj-Jv for qemu-devel@nongnu.org; Sat, 15 Feb 2020 11:16:05 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1581783365; 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=Z2UBuAZivxQ/t2LSYWdCfVvdvGAny5juqMvDOKi7+08=; b=YNlpnn41v51SHNGdA2nFXgR0x/oRIOxmxj7rGAMgTtP9VeI968fh54qsa4lQXIwngQTUT6 NGRG4Cl4ngtrWkbrTzDGDbhZM7/wqJRfMpjR8TGsDyoOpy9TjMfqxnSPMTSvlOlMZ2L1JG MA/azoHWF0gITp7hcCd7s+A90gq99sc= Received: from mail-wm1-f72.google.com (mail-wm1-f72.google.com [209.85.128.72]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-14-Uyx69B92Pc2ZYxHDdjVEDA-1; Sat, 15 Feb 2020 11:16:03 -0500 Received: by mail-wm1-f72.google.com with SMTP id w12so4854684wmc.3 for ; Sat, 15 Feb 2020 08:16:03 -0800 (PST) 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=1vNqWmtTfqRpFkSvpFeliBtBQdDhN9OVYIDlRsAhO9E=; b=jl+gSiCsHl3JYt5momQsQXVCNwHlEzWqOwEH7uT3wVvt0llmKoKX1gO7Rxst7c1VJQ 8qNlm06ODJuB2Km/NFQo9oKZ6sGQCLSw7NH40GtqM/Q5Pk6EMbcm/CA35UbP3Sx0LHb2 7JOVu3FliazEbouNu0qlBAmXALQgQVp0D/FBYboPQuO//Apxs8uV93pG8qbpsenoeN0m nSht1f4H5EeNVU7+x+x2eMKogYHHX6xtZsgdv4H84Ir5rsilJqhqZE2bEs0iTbFkyQzM H6zK+9c6e529cXNHQj1zyTbFNL5lW0zMbLOuX7GYBrIEYBIaHpLjh4si1UN5v64m8iWl Ye8w== X-Gm-Message-State: APjAAAVWykPiO/itoW0NynkW3knix+qxCcpubRrd2cu0fJy6xuJ1rWw7 XzZ52S+yIubLz7pCCi4O6V6tl+Eaw9jb1JI9vGcTEWfWYdF15XKKV/P2tFZ6ND0lA3KaRUgsGEE i3Bc8R2pi11jziWU= X-Received: by 2002:a1c:f60e:: with SMTP id w14mr11469963wmc.188.1581783361888; Sat, 15 Feb 2020 08:16:01 -0800 (PST) X-Google-Smtp-Source: APXvYqyHKeFfmpvOVz4HkZc7Il/FeQ6MQBGmlkbYvmqQyW1P76z6ZX7+OATJk6WrR8Udh7QO5nTWmA== X-Received: by 2002:a1c:f60e:: with SMTP id w14mr11469954wmc.188.1581783361731; Sat, 15 Feb 2020 08:16:01 -0800 (PST) Received: from localhost.localdomain (78.red-88-21-202.staticip.rima-tde.net. [88.21.202.78]) by smtp.gmail.com with ESMTPSA id w26sm11855872wmi.8.2020.02.15.08.16.00 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 15 Feb 2020 08:16:01 -0800 (PST) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Subject: [PATCH 1/3] block/qcow2-bitmap: Remove unneeded variable assignment Date: Sat, 15 Feb 2020 17:15:55 +0100 Message-Id: <20200215161557.4077-2-philmd@redhat.com> X-Mailer: git-send-email 2.21.1 In-Reply-To: <20200215161557.4077-1-philmd@redhat.com> References: <20200215161557.4077-1-philmd@redhat.com> MIME-Version: 1.0 X-MC-Unique: Uyx69B92Pc2ZYxHDdjVEDA-1 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 205.139.110.120 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: Kevin Wolf , Vladimir Sementsov-Ogievskiy , qemu-block@nongnu.org, qemu-trivial@nongnu.org, =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , Max Reitz , Gerd Hoffmann , John Snow Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: "Qemu-devel" Fix warning reported by Clang static code analyzer: CC block/qcow2-bitmap.o block/qcow2-bitmap.c:650:5: warning: Value stored to 'ret' is never read ret = -EINVAL; ^ ~~~~~~~ Reported-by: Clang Static Analyzer Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Richard Henderson Reviewed-by: Ján Tomko Reviewed-by: Vladimir Sementsov-Ogievskiy --- block/qcow2-bitmap.c | 1 - 1 file changed, 1 deletion(-) diff --git a/block/qcow2-bitmap.c b/block/qcow2-bitmap.c index d41f5d049b..8cccc2c9f3 100644 --- a/block/qcow2-bitmap.c +++ b/block/qcow2-bitmap.c @@ -647,7 +647,6 @@ static Qcow2BitmapList *bitmap_list_load(BlockDriverState *bs, uint64_t offset, return bm_list; broken_dir: - ret = -EINVAL; error_setg(errp, "Broken bitmap directory"); fail: From patchwork Sat Feb 15 16:15:56 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= X-Patchwork-Id: 1238580 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=nongnu.org (client-ip=209.51.188.17; helo=lists.gnu.org; envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=redhat.com Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=redhat.com header.i=@redhat.com header.a=rsa-sha256 header.s=mimecast20190719 header.b=HpZ2DX7s; dkim-atps=neutral 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 ozlabs.org (Postfix) with ESMTPS id 48Kb4P2SCHz9sP7 for ; Sun, 16 Feb 2020 03:17:25 +1100 (AEDT) Received: from localhost ([::1]:52402 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1j308B-0002zV-2U for incoming@patchwork.ozlabs.org; Sat, 15 Feb 2020 11:17:23 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:47789) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1j307R-0002vJ-JK for qemu-devel@nongnu.org; Sat, 15 Feb 2020 11:16:38 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1j307Q-00068h-LB for qemu-devel@nongnu.org; Sat, 15 Feb 2020 11:16:37 -0500 Received: from us-smtp-2.mimecast.com ([207.211.31.81]:53891 helo=us-smtp-delivery-1.mimecast.com) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1j306y-0005dK-0k for qemu-devel@nongnu.org; Sat, 15 Feb 2020 11:16:36 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1581783367; 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=2W2KV5vhhaOPypV6UoE9INvWUy7cADf9BtseHUCCnZ8=; b=HpZ2DX7sf47ZuOBheWWfoNDpWt4rd1f5k+ZpMwvr55p8bAdXYHkmFW3I3ep9Y3k+7RgjMm k0F/aDk956uSFggwVtbFSmGqxLfm86Tsx34YawM8wz0mvL9LAUkG7jwxig4TZX4CjQm67P PbC05lFSoh8e6B+xfBXMuppwOWwZfEo= 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-209-wLuubM3OPdicWWHTFDBTKg-1; Sat, 15 Feb 2020 11:16:04 -0500 Received: by mail-wr1-f69.google.com with SMTP id u18so5888936wrn.11 for ; Sat, 15 Feb 2020 08:16:04 -0800 (PST) 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=t93RD3b9dRJMk744Iwvg4Pa/O1lItTONfyZhiaohMVU=; b=hntyLaPoW0nLc+tbKyjnMpzMYyxptWB3avpkRQUCaCpUSo/tFbvGuIM5Ppv6RF+axh MvkgeiUMIhv4/2DbU0zrp5JbSG7jCeH1b+UioxRjTA4UTZBZb5+RpWY0c1tYwMneWIr1 NsicpuEU98WhQrk4p7Dfr6z1IBU154nmhDSG3qPYTrIZP7EsmsahuZtJzfk79buq55Oa iIiiZ/aREqzJeHWoPzySbtiualH02mYChoXrHJLtAP8pj5DZ/BqQi08OqX7AdusYGH+K ZQtJqsTFIvcRJ++5VDAyag/ay12OW3lxk/LzMkoPzDu5kxnLNTsWlDr34qGEnisreZRx SNGw== X-Gm-Message-State: APjAAAUYbm8WkSjddjQjba8lK6lUhGB9YDdjHyQCTZqxB5tDYnscJ1Xw VOsl/Infms8nj3pSnfwLYVETmhz6RJ1EPGMv4SPPpZNaiNRaumU3TxSNaB8V3RlX7CbuYyMbnUB dCVZboy6eLKwL6n4= X-Received: by 2002:a05:6000:192:: with SMTP id p18mr10610940wrx.218.1581783363450; Sat, 15 Feb 2020 08:16:03 -0800 (PST) X-Google-Smtp-Source: APXvYqwj+7l1rgw3xDAlzv9WUiiMsr0WEM7lX9ZCD/FFnzJs4cYtMVSolk6GYqoQJdpfzWpU1SzzAw== X-Received: by 2002:a05:6000:192:: with SMTP id p18mr10610917wrx.218.1581783363170; Sat, 15 Feb 2020 08:16:03 -0800 (PST) Received: from localhost.localdomain (78.red-88-21-202.staticip.rima-tde.net. [88.21.202.78]) by smtp.gmail.com with ESMTPSA id w26sm11855872wmi.8.2020.02.15.08.16.01 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 15 Feb 2020 08:16:02 -0800 (PST) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Subject: [PATCH 2/3] hw/display/qxl: Remove unneeded variable assignment Date: Sat, 15 Feb 2020 17:15:56 +0100 Message-Id: <20200215161557.4077-3-philmd@redhat.com> X-Mailer: git-send-email 2.21.1 In-Reply-To: <20200215161557.4077-1-philmd@redhat.com> References: <20200215161557.4077-1-philmd@redhat.com> MIME-Version: 1.0 X-MC-Unique: wLuubM3OPdicWWHTFDBTKg-1 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 207.211.31.81 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: Kevin Wolf , Vladimir Sementsov-Ogievskiy , qemu-block@nongnu.org, qemu-trivial@nongnu.org, =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , Max Reitz , Gerd Hoffmann , John Snow Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: "Qemu-devel" Fix warning reported by Clang static code analyzer: hw/display/qxl.c:1634:14: warning: Value stored to 'orig_io_port' during its initialization is never read uint32_t orig_io_port = io_port; ^~~~~~~~~~~~ ~~~~~~~ Reported-by: Clang Static Analyzer Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Richard Henderson --- hw/display/qxl.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hw/display/qxl.c b/hw/display/qxl.c index 64884da708..21a43a1d5e 100644 --- a/hw/display/qxl.c +++ b/hw/display/qxl.c @@ -1631,7 +1631,7 @@ static void ioport_write(void *opaque, hwaddr addr, PCIQXLDevice *d = opaque; uint32_t io_port = addr; qxl_async_io async = QXL_SYNC; - uint32_t orig_io_port = io_port; + uint32_t orig_io_port; if (d->guest_bug && io_port != QXL_IO_RESET) { return; From patchwork Sat Feb 15 16:15:57 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= X-Patchwork-Id: 1238578 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=nongnu.org (client-ip=209.51.188.17; helo=lists.gnu.org; envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=redhat.com Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=redhat.com header.i=@redhat.com header.a=rsa-sha256 header.s=mimecast20190719 header.b=ik/OA6Fx; dkim-atps=neutral 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 ozlabs.org (Postfix) with ESMTPS id 48Kb3g3bJbz9sP7 for ; Sun, 16 Feb 2020 03:16:47 +1100 (AEDT) Received: from localhost ([::1]:52384 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1j307Z-0002Xx-6l for incoming@patchwork.ozlabs.org; Sat, 15 Feb 2020 11:16:45 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:47699) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1j3071-0002Ey-F7 for qemu-devel@nongnu.org; Sat, 15 Feb 2020 11:16:12 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1j3070-0005gk-DQ for qemu-devel@nongnu.org; Sat, 15 Feb 2020 11:16:11 -0500 Received: from us-smtp-delivery-1.mimecast.com ([205.139.110.120]:52690 helo=us-smtp-1.mimecast.com) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1j3070-0005fi-9s for qemu-devel@nongnu.org; Sat, 15 Feb 2020 11:16:10 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1581783369; 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=pthG4sX1WmuDcM1pYL7nuZk6uLcNUXuiJV60qYY0Cuc=; b=ik/OA6FxrSQdfe2gIjtCbZAsrlXRFq3RXKHw0Tom2wwgg1EQ3J1cGzwrK+QctnCF3zU23m 28Mc8t32EIbUT1FIknBq2s3HEZLTOALgiDl7MIn2DRgoRMqKYVULrE04kqCfomjYvNQJyr 7oh+N51IzFZbUKF7iqO1V4H2QPTGaJs= 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-T1FtHXOdOReZoR-8xe3pzA-1; Sat, 15 Feb 2020 11:16:06 -0500 Received: by mail-wr1-f71.google.com with SMTP id s13so5932122wrb.21 for ; Sat, 15 Feb 2020 08:16:06 -0800 (PST) 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=FnvdgJ+pULlElBjPbypj5ZtQBic6wsKotYOG0wxZcb4=; b=G/EqiyhQezSBBK4Gma1wIpeTO5DeQHES/8u/wFsBFGWaw1Y+vkT9KpAy9WAa7pTpds vYR3KI4u6k2mZUX++n7GVuSkNpQdugU5wB7XZQKxxiwQXNVtNlqtpsoqGIF1WaVBL7rM wuHgrHFQmUtoS4fzIJCJTbJzhJYD1fKpGnTqkOWhN4AzONqESvo76cCaKCLFg7v0BFRI jBylJPg7lBobyhm9PHiCYDHY6CaaOlcKJGcYRNXv46irP+CQZ01kz7YQm2iPdkgakCWA cGNEKqFJIoCIA7RvVKTNtr0uPwg/cmdVUp5AgnsBSpMbrHwC4/RS1ivWYCslrTPj0y+x nmdA== X-Gm-Message-State: APjAAAU0lxGUhb0ZOyW0xlf753j4N0lxIZwatmwI10QYTAeP604hS0Lw HdFcx2A+xG+8l26XoR4g+hVU6pP2swtPefuNFxbYWvwZ5vxSqpoS/2MCzMz12wZ4rjHwwo2Whao pQmTfOenaNlIlvbs= X-Received: by 2002:adf:fd0e:: with SMTP id e14mr10590725wrr.127.1581783364859; Sat, 15 Feb 2020 08:16:04 -0800 (PST) X-Google-Smtp-Source: APXvYqy/QDpZRjslcyFsFHRjtLnaMikvruJ3gCZAD8x7auXnoxru3hRQh1UJq8R17PhP9hIZE7mF9A== X-Received: by 2002:adf:fd0e:: with SMTP id e14mr10590704wrr.127.1581783364655; Sat, 15 Feb 2020 08:16:04 -0800 (PST) Received: from localhost.localdomain (78.red-88-21-202.staticip.rima-tde.net. [88.21.202.78]) by smtp.gmail.com with ESMTPSA id w26sm11855872wmi.8.2020.02.15.08.16.03 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 15 Feb 2020 08:16:04 -0800 (PST) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Subject: [PATCH 3/3] hw/block/pflash_cfi02: Remove unneeded variable assignment Date: Sat, 15 Feb 2020 17:15:57 +0100 Message-Id: <20200215161557.4077-4-philmd@redhat.com> X-Mailer: git-send-email 2.21.1 In-Reply-To: <20200215161557.4077-1-philmd@redhat.com> References: <20200215161557.4077-1-philmd@redhat.com> MIME-Version: 1.0 X-MC-Unique: T1FtHXOdOReZoR-8xe3pzA-1 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 205.139.110.120 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: Kevin Wolf , Vladimir Sementsov-Ogievskiy , qemu-block@nongnu.org, qemu-trivial@nongnu.org, =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , Max Reitz , Gerd Hoffmann , John Snow Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: "Qemu-devel" Fix warning reported by Clang static code analyzer: CC hw/block/pflash_cfi02.o hw/block/pflash_cfi02.c:311:5: warning: Value stored to 'ret' is never read ret = -1; ^ ~~ Reported-by: Clang Static Analyzer Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Richard Henderson --- hw/block/pflash_cfi02.c | 1 - 1 file changed, 1 deletion(-) diff --git a/hw/block/pflash_cfi02.c b/hw/block/pflash_cfi02.c index 7c4744c020..12f18d401a 100644 --- a/hw/block/pflash_cfi02.c +++ b/hw/block/pflash_cfi02.c @@ -308,7 +308,6 @@ static uint64_t pflash_read(void *opaque, hwaddr offset, unsigned int width) hwaddr boff; uint64_t ret; - ret = -1; /* Lazy reset to ROMD mode after a certain amount of read accesses */ if (!pfl->rom_mode && pfl->wcycle == 0 && ++pfl->read_counter > PFLASH_LAZY_ROMD_THRESHOLD) {