From nobody Fri May 17 03:54:40 2024 Delivered-To: importer@patchew.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=1587562708; cv=none; d=zohomail.com; s=zohoarc; b=ffC7GWi/Nz6ET8tdXKRWIpGljv9pdtOlOWmS3IOt2b+g9S3iCSyI8zYfIGUOkc9WHSDnzVf0TkbYxp/xTZ1GUXSVgtrkSWT4nCa53iVgUQGKotkRn4wdTLzc6+BVf0fF5LPVdnPaS1uG12tkzZ95yoWLRGK32q9obGUJLZ18Meo= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1587562708; 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=EddQPcYtdLgHdxZ2GiPc2DPPevSFRzd+HN7v8HerO6Q=; b=jAo0EMMDw+a+qynvs/lODso/Y1vuqH49uhHCrCVNTB0zMPySmmBAfnYCLOJa9RD8OFK0gruKWNPJRVkA1C4Z56cUhGMjoLGsatuUSK4v3slMyfG3yt6q5Q8D+zCmHeGBUI8gMsBDhI7AdwifHIFCOhMrQU8IG4+NFJlEM6VrWUY= 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 1587562708949935.2008302192437; Wed, 22 Apr 2020 06:38:28 -0700 (PDT) Received: from localhost ([::1]:50814 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jRFa7-0006jc-Lr for importer@patchew.org; Wed, 22 Apr 2020 09:38:27 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:59174) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jRFU8-0006Jo-Jg for qemu-devel@nongnu.org; Wed, 22 Apr 2020 09:32:30 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.90_1) (envelope-from ) id 1jRFTx-00022F-4x for qemu-devel@nongnu.org; Wed, 22 Apr 2020 09:32:15 -0400 Received: from us-smtp-delivery-1.mimecast.com ([205.139.110.120]:40739 helo=us-smtp-1.mimecast.com) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.90_1) (envelope-from ) id 1jRFTw-0001zE-N5 for qemu-devel@nongnu.org; Wed, 22 Apr 2020 09:32:04 -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-334-gdLbxDQ8PbmTlYGGHgzZKQ-1; Wed, 22 Apr 2020 09:32:02 -0400 Received: by mail-wr1-f69.google.com with SMTP id j16so1027650wrw.20 for ; Wed, 22 Apr 2020 06:32:01 -0700 (PDT) Received: from x1w.redhat.com (116.red-83-42-57.dynamicip.rima-tde.net. [83.42.57.116]) by smtp.gmail.com with ESMTPSA id u12sm8166030wmu.25.2020.04.22.06.31.58 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 22 Apr 2020 06:31:59 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1587562323; 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=EddQPcYtdLgHdxZ2GiPc2DPPevSFRzd+HN7v8HerO6Q=; b=WFFWDpUjUg9Y/kxK1mo8jbcUPYfckW7hr5iUWgi6yH7vtZjqLUQ/hWX9cZwFsFag3oLyAU qGQWTJitngCimFFScDSXNjb1V7dBPqdyI5CMWH5sI/GFZHLnOBMxyYi2fw4WT6/ZA9wLGB x/73b5W/2XaeAJ/yFg+uZshq5k3tAU4= X-MC-Unique: gdLbxDQ8PbmTlYGGHgzZKQ-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=W1lYGStJLCIwnYjiuY8mcwIaZ71ZmPjavSPH5JD14Mc=; b=bRXCCgPZqga7MdaySrnkl/eDyfEK40EXuuz8uDG58g25onzKxsDicjkjfBo+DcnJGN hmlkX90YcvddD8BdYboNnFWSu3fFO+kM3QVwdS/BwAW98gWP1eleCDea+spoxe7+wIle c37MysuJ7IQpv7EQ57omwgyH+alh3XmPkqERp/0B5voSYH358FzptxgvDyQ3EXYVfl4p 8ap8GUmlTXj96IJ1aaIghPHFkpFH/7nV3tPbIQjBM7KFg7KQT+u1P+8J/UZ4jzHdoi8d LJObY24sooQNIxRHrHZ9/GGY5qMd9rXkjCQTEQVsRTuJjyENZhQpK10A5zvr4ujh6asu cdbw== X-Gm-Message-State: AGi0PuYdNDzVTDR9KPUOItHeWLLmOSKeCesJVRbCrkxFwktICfOXJDL7 uqStauuPJBC0US7lbC3k2L9P0bb4k15k+u0wwpWDWegrkExC260lhvw/yBWkIg4JwBU6s7B/VU5 ggPolN7jI9pNlN/U= X-Received: by 2002:adf:f0cb:: with SMTP id x11mr30143983wro.266.1587562320626; Wed, 22 Apr 2020 06:32:00 -0700 (PDT) X-Google-Smtp-Source: APiQypLQNZoYRve3BMh/BCsvwykR4XDFWol49DCJ0F1Tpd1HazAVoxGAfH3vkEkcxaX/yVgFs4TCUA== X-Received: by 2002:adf:f0cb:: with SMTP id x11mr30143935wro.266.1587562319974; Wed, 22 Apr 2020 06:31:59 -0700 (PDT) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Subject: [PATCH v3 1/9] block: Avoid dead assignment Date: Wed, 22 Apr 2020 15:31:44 +0200 Message-Id: <20200422133152.16770-2-philmd@redhat.com> X-Mailer: git-send-email 2.21.1 In-Reply-To: <20200422133152.16770-1-philmd@redhat.com> References: <20200422133152.16770-1-philmd@redhat.com> MIME-Version: 1.0 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable 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; Received-SPF: pass client-ip=205.139.110.120; envelope-from=philmd@redhat.com; helo=us-smtp-1.mimecast.com X-detected-operating-system: by eggs.gnu.org: First seen = 2020/04/22 04:15:03 X-ACL-Warn: Detected OS = 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 , "open list:Block layer core" , qemu-trivial@nongnu.org, Markus Armbruster , Max Reitz , Alistair Francis , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= 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 Reviewed-by: Alistair Francis Signed-off-by: Philippe Mathieu-Daud=C3=A9 Reviewed-by: Max Reitz --- block.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/block.c b/block.c index 2e3905c99e..27e7e0e3ab 100644 --- a/block.c +++ b/block.c @@ -3171,7 +3171,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 17 03:54:40 2024 Delivered-To: importer@patchew.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=1587562643; cv=none; d=zohomail.com; s=zohoarc; b=m3jkfKvLg10oAeAygbWDwlMEhHMwhHVCn9WhxTac8MCPOZxnVC+WMVQssSLr55auyiGlvUoVj6cOHDCBI95sWKTNfQn5LLq6pMyjPHT/UyP/fxomu2n8+oh+WrIxG0CjdH0zau05ESlWXOEpXWcCGM/pB7kCFtYLygjgwFBI5xg= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1587562643; 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=YZg74COLwFUF/jY+SXz3kI7friU0vuAElQ6XQYULdGuBAV70ucb9eo+C2JDATbZ7UdIEFfpbiYXIfe4wW7sVOCUWbS6YM9PqjrT1vBe+SIpnpW+ZhoTebNcGmnRYFamlXKn6R9gEASqmUGLprFdqesEBx5+WeVH/P/ssZjg9cX4= 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 158756264379016.641693718643296; Wed, 22 Apr 2020 06:37:23 -0700 (PDT) Received: from localhost ([::1]:50800 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jRFZ4-0004vY-JA for importer@patchew.org; Wed, 22 Apr 2020 09:37:22 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:59812) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jRFV0-0007Vy-34 for qemu-devel@nongnu.org; Wed, 22 Apr 2020 09:33:10 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.90_1) (envelope-from ) id 1jRFUz-00052T-Kg for qemu-devel@nongnu.org; Wed, 22 Apr 2020 09:33:09 -0400 Received: from us-smtp-1.mimecast.com ([207.211.31.81]:33104 helo=us-smtp-delivery-1.mimecast.com) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.90_1) (envelope-from ) id 1jRFUz-0004zk-6L for qemu-devel@nongnu.org; Wed, 22 Apr 2020 09:33:09 -0400 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-75-ncgil7nSOyGfb95W5BY1kA-1; Wed, 22 Apr 2020 09:33:07 -0400 Received: by mail-wm1-f72.google.com with SMTP id q5so792372wmc.9 for ; Wed, 22 Apr 2020 06:33:06 -0700 (PDT) Received: from x1w.redhat.com (116.red-83-42-57.dynamicip.rima-tde.net. [83.42.57.116]) by smtp.gmail.com with ESMTPSA id b82sm8326135wmh.1.2020.04.22.06.32.04 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 22 Apr 2020 06:32:04 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1587562388; 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=OY2XgS2sSon8MK7t/t+L497su4hFSAPjGI0EmCC34Lz4w3ssEBV2uN+WPMRr/hNTW7y6Mr EKRZ4uS59y5/o8q0DIT4p+YOPRXF7pv+GpT05IYxRPqqMNrDH+iGhDA7Cb6NLCplgRm1El c1ObA63NWUqQefo12cwXxx3XJkPY61Q= X-MC-Unique: ncgil7nSOyGfb95W5BY1kA-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=MGL6xv/UYM6ocje2c4Nx4IP8PiAVhWtTdxKdKXyW4j5Eqa6+aGuHa/Sjp0BR5xnWFM RsXrdxeCR4phE/5kVKEEk8drNMIWoIRbEY7PWNlCdHAD8XP584dZME3FG6WJGyWPG3u2 DS2qZRezuFl7RXGfk+iGctBor6n4Cx2hcPiMOrOVodO1Mgf+B0KGqRvHP0q3VTlF6Dy7 P3cTGfkYle3EsyN35KujCZB6skKrZkAIpZbMuLUxQ/gdKocUmeFZw6oytvGosDa1zCPf 1SQ7GjU0jJ0/h3cPICaZjyn5CSH2gq+wYjPu6banlzurjoAylro4PvCVMcego0JMPprJ UIPA== X-Gm-Message-State: AGi0PuarPNrkFk7WiuPBEDu4Z2pK/MohHb6BBIKD6MflU2M7ohZBDH1u W/hregOy4JebNetRRQjs6/zzBgAA1LizpcZ/XdlqieNq9sK3lS6LteJ/N2E646xh7IvLN/2GW9f W17MMhwvbMEBt2IE= X-Received: by 2002:a7b:cf25:: with SMTP id m5mr11344951wmg.65.1587562325424; Wed, 22 Apr 2020 06:32:05 -0700 (PDT) X-Google-Smtp-Source: APiQypLEMtqlGM7tlPDkeJxSPb7125x+W85cCCPYOZelLyU8UzBj4cOszGUa++XN2tBEWSaTPl4QZQ== X-Received: by 2002:a7b:cf25:: with SMTP id m5mr11344924wmg.65.1587562325181; Wed, 22 Apr 2020 06:32:05 -0700 (PDT) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Subject: [PATCH v3 2/9] blockdev: Remove dead assignment Date: Wed, 22 Apr 2020 15:31:45 +0200 Message-Id: <20200422133152.16770-3-philmd@redhat.com> X-Mailer: git-send-email 2.21.1 In-Reply-To: <20200422133152.16770-1-philmd@redhat.com> References: <20200422133152.16770-1-philmd@redhat.com> MIME-Version: 1.0 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable 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; Received-SPF: pass client-ip=207.211.31.81; envelope-from=philmd@redhat.com; helo=us-smtp-delivery-1.mimecast.com X-detected-operating-system: by eggs.gnu.org: First seen = 2020/04/22 02:12:04 X-ACL-Warn: Detected OS = 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 , "open list:Block layer core" , qemu-trivial@nongnu.org, Markus Armbruster , Max Reitz , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= 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 Reviewed-by: Max Reitz --- 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 17 03:54:40 2024 Delivered-To: importer@patchew.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=1587562607; cv=none; d=zohomail.com; s=zohoarc; b=mi9nXlJKmMNXvpH/fVS5isV69E5oeQuNdYnVz6nl1Ekpd9t0dBCHefi+QFYA7lCrGeCvA+ZIM0qgnP2VCEGi+ro8wlGh+p/IsO+V6hj9y8HsFZfp/vxsBKW6cOcIHuM7FDoS1Rujt3Y8y9jdOqS5w77jQ5eWBPpCjVWO57RfGuI= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1587562607; 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=kbhb8PXc0mO/1TMkYieEGxWYqNfWPp+iXA4REG7HVoQ=; b=mCZ3p2DouelgK0MQWOPkRjiqLFZattGkFTSUSfa/2msxxVFbRRVxGGTWWXcrMPE/BezwNrtyd7b2SNCMs2gCyrjGzHWl6xJG3IhCMfhkBrINjdZMKsNQZGFpZF94r6qbjUX9c1R1p/XaKJ5o54PXIp8qBc8+D5koCShpD9Tl+uM= 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 1587562607557361.94591175171774; Wed, 22 Apr 2020 06:36:47 -0700 (PDT) Received: from localhost ([::1]:50796 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jRFYU-0003u3-Bj for importer@patchew.org; Wed, 22 Apr 2020 09:36:46 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:59294) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jRFUK-0006PX-1Q for qemu-devel@nongnu.org; Wed, 22 Apr 2020 09:32:29 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.90_1) (envelope-from ) id 1jRFU9-0002Yt-5v for qemu-devel@nongnu.org; Wed, 22 Apr 2020 09:32:27 -0400 Received: from us-smtp-delivery-1.mimecast.com ([205.139.110.120]:58174 helo=us-smtp-1.mimecast.com) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.90_1) (envelope-from ) id 1jRFU8-0002Xa-J9 for qemu-devel@nongnu.org; Wed, 22 Apr 2020 09:32:16 -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-166-ISF335z7O3uN0zz-qqAcMw-1; Wed, 22 Apr 2020 09:32:11 -0400 Received: by mail-wr1-f71.google.com with SMTP id p16so1035845wro.16 for ; Wed, 22 Apr 2020 06:32:11 -0700 (PDT) Received: from x1w.redhat.com (116.red-83-42-57.dynamicip.rima-tde.net. [83.42.57.116]) by smtp.gmail.com with ESMTPSA id u127sm8228653wme.8.2020.04.22.06.32.09 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 22 Apr 2020 06:32:09 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1587562335; 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=kbhb8PXc0mO/1TMkYieEGxWYqNfWPp+iXA4REG7HVoQ=; b=gh+8NbYlc9eHBd7RJZ9Dx92Ag8S3ABMscec3U5blNaSfsQxNuY9Yi8tZQYpmDRF1Z1H2a4 x+1xVOaobvKmnEdRXuhV1OwsHSAzPoKjyKEKGAMZPeCen0Jc52YGIAMa1rmQNdZlxu7i1e FzQI//01omKK69C2LcQ/s0JbwFUpTYw= X-MC-Unique: ISF335z7O3uN0zz-qqAcMw-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=bCsuLg6l9rCOFqdEp8PJclmAT0RCbEg/PEbjffqRb9A=; b=sudFHL3p3iCDEiPB3J5i8UM5CslFVw5/84rSy0Qa4N1fD/WUNuwpJhk9V0H8JH4KpG MEm1Gjl+ip24T+uN9RfZ61B9NU8UqgmO9ThAjh2wq3835C7BEeNyW4a0NaAoPmUsVuMX qohOUkEfha+JXCA6G3FSv0qDBcsEAPYoI4lzRR5JdEMcnD0CA0eu1uPPNCu1jzEjwGuv C/MIDqRjzHl+BmcDy+JOIWGr4raiHPh0DjtlHNyknSn+M8kL4w5zwM4YRfOIG0ojthYm 60HJFsfoAHZAkW52as/PLx+rgMF5wvKTNf2RS/GpGr4cmnAkidphywCWSno6XYd3hCTk fuEQ== X-Gm-Message-State: AGi0PuahiQvosuswdS9zWZNAoNpndU20sWHiTsDQtpXPP+xUSLtrLc7Z bB1vL6i/6dGipsf6S5nfb3gpjcomjqgaT1dsSubSraKDleevoghFfh8WX0idIj6gvoGHcYSqLAA 02q+3tLlKEQtQG6k= X-Received: by 2002:a7b:c755:: with SMTP id w21mr10387295wmk.120.1587562330240; Wed, 22 Apr 2020 06:32:10 -0700 (PDT) X-Google-Smtp-Source: APiQypLYA9+ugGytKHJcVjgqQyyLgri/XnZFg00t/v4mlEVQj2OqPIgxDxR5iT3qfGmXy8rHuq1B6w== X-Received: by 2002:a7b:c755:: with SMTP id w21mr10387279wmk.120.1587562330041; Wed, 22 Apr 2020 06:32:10 -0700 (PDT) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Subject: [PATCH v3 3/9] hw/i2c/pm_smbus: Remove dead assignment Date: Wed, 22 Apr 2020 15:31:46 +0200 Message-Id: <20200422133152.16770-4-philmd@redhat.com> X-Mailer: git-send-email 2.21.1 In-Reply-To: <20200422133152.16770-1-philmd@redhat.com> References: <20200422133152.16770-1-philmd@redhat.com> MIME-Version: 1.0 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable 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; Received-SPF: pass client-ip=205.139.110.120; envelope-from=philmd@redhat.com; helo=us-smtp-1.mimecast.com X-detected-operating-system: by eggs.gnu.org: First seen = 2020/04/22 04:15:03 X-ACL-Warn: Detected OS = 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: qemu-trivial@nongnu.org, Alistair Francis , Paolo Bonzini , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , "Michael S. Tsirkin" 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 Reviewed-by: Alistair Francis Signed-off-by: Philippe Mathieu-Daud=C3=A9 --- 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 17 03:54:40 2024 Delivered-To: importer@patchew.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=1587562501; cv=none; d=zohomail.com; s=zohoarc; b=YoXgwgJN4+ABKpnznCmme4HTkCqQh7VqnnuZRqF5Sc8ngzmtPTPeL+99t2rNMDWpqkSHdcTSWzgVDVCOO0nbUZ8zgxX5BCmEncp7T2InZTTUwWnJI4q8T0uiTSffTwD1thUUML9o19nQrezevNIjakq7ffDKt0A6fL7LA9IThjw= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1587562501; 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=LVOONsEpk4U6LFttK9TygLseO38jIaZn5oKoHqGQGaQ=; b=hWBsUgTzBlis0lVaDd2ms/ssazuqDQy/m8gQtNTyoHIqJjKtsZNnE7ug3t3PdV9PdTIZnDtf0tgSSY9XckX5H9dgVwcGBmS8LUV+40SOLS/hFadSm73whcZIz+XScZ2OvbtrYVWfEPMUbojDZwet7RDKu5ky+GyCDuULkN2DwEY= 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 1587562501448466.3261310949422; Wed, 22 Apr 2020 06:35:01 -0700 (PDT) Received: from localhost ([::1]:50742 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jRFWm-0001CT-60 for importer@patchew.org; Wed, 22 Apr 2020 09:35:00 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:59324) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jRFUL-0006Px-By for qemu-devel@nongnu.org; Wed, 22 Apr 2020 09:32:33 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.90_1) (envelope-from ) id 1jRFUD-0002iB-H3 for qemu-devel@nongnu.org; Wed, 22 Apr 2020 09:32:29 -0400 Received: from us-smtp-delivery-1.mimecast.com ([205.139.110.120]:46055 helo=us-smtp-1.mimecast.com) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.90_1) (envelope-from ) id 1jRFUD-0002de-3B for qemu-devel@nongnu.org; Wed, 22 Apr 2020 09:32:21 -0400 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-238-KrUF0xuuNamI_2HKTRkaxw-1; Wed, 22 Apr 2020 09:32:16 -0400 Received: by mail-wm1-f72.google.com with SMTP id n17so807264wmi.3 for ; Wed, 22 Apr 2020 06:32:16 -0700 (PDT) Received: from x1w.redhat.com (116.red-83-42-57.dynamicip.rima-tde.net. [83.42.57.116]) by smtp.gmail.com with ESMTPSA id f63sm7542662wma.47.2020.04.22.06.32.13 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 22 Apr 2020 06:32:14 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1587562340; 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=LVOONsEpk4U6LFttK9TygLseO38jIaZn5oKoHqGQGaQ=; b=DGa5zq6/loepDv1SiBtTTiHN5SI2ISvlt4yLBpUwTPmdyhxSGndXMrPSuto+EuHS0TCf3t /Mkz73XAGzXoWm7vniFeS7Fv4OmB3AF3dbNOVvS+n67xmBf+ok1K83w+Gn3a94G7EEyVps fuGm3uuoR5O1ETy7t7OHfzfDi2OeMAU= X-MC-Unique: KrUF0xuuNamI_2HKTRkaxw-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=S6WvnF67wihOHFujRWuSLGe59jb6c00JiTbf8Rd3b+M=; b=oFChc74oD2vcU6aFmzLdsQg64Sm1niu1D2hERc9QoOcnOUUTwgnUtabvSG/w7PJgA4 N69vdYDh+4jNVG9pMlOdCmuaodAre1rYQuR7wnMx5wn88tMlKDMOlIgGlAAYVjwFxdH7 IknpamDCj3sLb3MLI9FHKUWo30L30lCNyI0hfcu+8Uloph/q9YazeOuGa/I3PandOfda t3thIkwDFObFQclrWfWL8brHd/xtIg95EtY0tAXYa/NKtH+JSPpdJuIIWW56s6gg+kD4 2Vaf+a1p53rCd2h2d6sp8jjKiKKUYEPk9SBM05p//nSzHKpQ9t8uNVkO3Jf3USSbBCSZ qvRw== X-Gm-Message-State: AGi0PuYLbexdEOfVpLPjBhq6LtA1n+5LKy+BzZv3toZs8ITZObD/UE49 Wi93yX1uYm3tZDpM3lx1gBxH3AJj6YHtUnzsZMt/H2sV4oz4urCBTgnaT4k4X7x4Yqn4BOx2TdO AafYRixCNtdCLy0g= X-Received: by 2002:a5d:5304:: with SMTP id e4mr28251639wrv.87.1587562335036; Wed, 22 Apr 2020 06:32:15 -0700 (PDT) X-Google-Smtp-Source: APiQypKTeUTC6gkp8EoASB2jIwR7sEykaxaGUnt172xGztNTXm45k8P9Url5pwWP/8pb2/MDtjPKRA== X-Received: by 2002:a5d:5304:: with SMTP id e4mr28251626wrv.87.1587562334830; Wed, 22 Apr 2020 06:32:14 -0700 (PDT) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Subject: [PATCH v3 4/9] hw/input/adb-kbd: Remove dead assignment Date: Wed, 22 Apr 2020 15:31:47 +0200 Message-Id: <20200422133152.16770-5-philmd@redhat.com> X-Mailer: git-send-email 2.21.1 In-Reply-To: <20200422133152.16770-1-philmd@redhat.com> References: <20200422133152.16770-1-philmd@redhat.com> MIME-Version: 1.0 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable 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; Received-SPF: pass client-ip=205.139.110.120; envelope-from=philmd@redhat.com; helo=us-smtp-1.mimecast.com X-detected-operating-system: by eggs.gnu.org: First seen = 2020/04/22 04:15:03 X-ACL-Warn: Detected OS = 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: qemu-trivial@nongnu.org, Mark Cave-Ayland , "open list:Old World g3beige" , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , David Gibson 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 Acked-by: David Gibson Signed-off-by: Philippe Mathieu-Daud=C3=A9 --- 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 17 03:54:40 2024 Delivered-To: importer@patchew.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=1587562642; cv=none; d=zohomail.com; s=zohoarc; b=VPj2HFTh/sDkYfEJ3BNtRJ3lBg8eldcYzCg44jnyIOQ1DE0D15UkigVCWsnMrqe79huiH8pwgNHhaqzacd/wi6q2o5KhXdsQKEUt+y31ayMZvrTh9entRKvnw3EAarudjMN01sxb1uTXq/7H3dNv5LNM8czzjwY8we2582b5+JI= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1587562642; 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=CAm/ELJG3BqWeqIODV3zHLDQPYZpESaEVU+juqiMjnQ=; b=MgJEwFXeNpPa3k7Po/4sYG8/LWnPUaCJZvouLonUH61I0l4ndSSwUHNQE4zR1gm4QoMDCz3VZSZGkJzJifc1HIebBH9c7/T8IzYpH/uyTKwFT08+xzaIyYEZnxPh4zwdusD2Wk1jf9tCBeOCgX63467xWGzwQ7zxm1mZLd/FcS8= 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 1587562642303347.9666218029291; Wed, 22 Apr 2020 06:37:22 -0700 (PDT) Received: from localhost ([::1]:50798 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jRFZ3-0004qt-1P for importer@patchew.org; Wed, 22 Apr 2020 09:37:21 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:59362) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jRFUM-0006S5-KL for qemu-devel@nongnu.org; Wed, 22 Apr 2020 09:32:33 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.90_1) (envelope-from ) id 1jRFUK-00031Y-7C for qemu-devel@nongnu.org; Wed, 22 Apr 2020 09:32:30 -0400 Received: from us-smtp-delivery-1.mimecast.com ([207.211.31.120]:22577 helo=us-smtp-1.mimecast.com) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.90_1) (envelope-from ) id 1jRFUJ-0002v5-Ge for qemu-devel@nongnu.org; Wed, 22 Apr 2020 09:32: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-33-KqyylhFFPWmGyJuae1secA-1; Wed, 22 Apr 2020 09:32:21 -0400 Received: by mail-wr1-f69.google.com with SMTP id v9so1044138wrt.7 for ; Wed, 22 Apr 2020 06:32:21 -0700 (PDT) Received: from x1w.redhat.com (116.red-83-42-57.dynamicip.rima-tde.net. [83.42.57.116]) by smtp.gmail.com with ESMTPSA id y7sm8374745wmb.43.2020.04.22.06.32.18 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 22 Apr 2020 06:32:19 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1587562345; 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=CAm/ELJG3BqWeqIODV3zHLDQPYZpESaEVU+juqiMjnQ=; b=Wi5Ir4TGg/OKQafn7WFKdbZ3wl6P34dMQZkuI8VgHQN9ZmBza4x06Xq0ii4E6it57fHpsV voxOwKl1cjGIqjORWstwF+LXdu+3Xc2jrmfTQHUt9928m0EQeEH3w8hteOTutA8PhtWOm0 BmQWiiFZv2uIPZwteso651FbXRGyhds= X-MC-Unique: KqyylhFFPWmGyJuae1secA-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=2FKpjcCgxFkJLIX2UQN4Z0uyrzf8czNZGVSlJzZoMlE=; b=bqy0LuSTsID8qs2k8Nvs/82R8m+OC342tC5ZDlulHTDVYpq2QjTJgqSwdeEL8fvdc/ kRmWFk/Y3D0N8DLq98MXy2AeOzCSoQ/R2/OodJn53Vq6VuBfoI/Rp2oMDuYViMUiyG9x 0lBlEA2PyWit7E8oF/70oOs++E+ZUKXnxraWaV3GOej2/hpDFHPDEnrMH3ndvG9ywNTk PF5ImDyHW4WJDbTn8NNd69tGgC7686EssuO87jzWLpeqGllRIDAwWvxW0a+QDTowyBFX C9um77WHzMLbHovVwVtCOhSp+gikjpeKpmnfefTAbOUHs+MNCfCS9WcFcIOeSTJ7nYcV DTcw== X-Gm-Message-State: AGi0Pua2DHG6OhcGYgO3zrK15jxl3jrguKtSs2hvx65Sx280K79Df5j7 FVgUAIybvUnS5Fwl51wCyVAWcNEHm6hxiW0Vv/NlUcn58wFkbnRxTuvlLMT6Odav3MxzNDpm+nR m85TKMA79evKfUXc= X-Received: by 2002:a05:600c:2255:: with SMTP id a21mr10753410wmm.150.1587562339896; Wed, 22 Apr 2020 06:32:19 -0700 (PDT) X-Google-Smtp-Source: APiQypKBHCxVFL6Ws9hQAYww/uSUD16SaeWprZDoQADn+KRz09ut8eE6N/X1REGfFk5aEplfb6ksWA== X-Received: by 2002:a05:600c:2255:: with SMTP id a21mr10753390wmm.150.1587562339737; Wed, 22 Apr 2020 06:32:19 -0700 (PDT) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Subject: [PATCH v3 5/9] hw/ide/sii3112: Remove dead assignment Date: Wed, 22 Apr 2020 15:31:48 +0200 Message-Id: <20200422133152.16770-6-philmd@redhat.com> X-Mailer: git-send-email 2.21.1 In-Reply-To: <20200422133152.16770-1-philmd@redhat.com> References: <20200422133152.16770-1-philmd@redhat.com> MIME-Version: 1.0 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable 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; Received-SPF: pass client-ip=207.211.31.120; envelope-from=philmd@redhat.com; helo=us-smtp-1.mimecast.com X-detected-operating-system: by eggs.gnu.org: First seen = 2020/04/22 09:07:24 X-ACL-Warn: Detected OS = Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 207.211.31.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: "open list:IDE" , qemu-trivial@nongnu.org, =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , "open list:sam460ex" , John Snow 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 Acked-by: John Snow Signed-off-by: Philippe Mathieu-Daud=C3=A9 --- 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 d69079c3d9..94d2b57f95 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 17 03:54:40 2024 Delivered-To: importer@patchew.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=1587562487; cv=none; d=zohomail.com; s=zohoarc; b=WMYqGh4stikysvJruLNwLqKmiZCIVm0+fMUOWU3FxTZY357eWiJdyz7y7mIgNLuppJ26shhLy0AnpDd/HbGE7Jvz9k5msLfwi/j1D86gDxMjr/+sV2zNmbaLxz3I16/XBd+7V6pL3lO528Wh7fDB2KFIVrFtFGzANPeJqTL8yXg= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1587562487; 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=Flbegfe+XvQdIALgmwjud+bmSRqDw+xWJxrHvvD5T5c=; b=nIVH4UsC96tojSctvAYGDfNf4V85SnPr9B0Vleuc9QOGe91a1/+sX4XrL0S9wnL6mzNnOzO+3XwpAWh5A4RHMbE8hPLN0uMpFwnfDZkM0FWUtUbd/v0tMyXWSyhz+QE3nC5e40vK05NTLtZur79enaaSpWU1u59sEwpL3bbindw= 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 1587562487480482.64370962037935; Wed, 22 Apr 2020 06:34:47 -0700 (PDT) Received: from localhost ([::1]:50740 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jRFWY-0000eP-1u for importer@patchew.org; Wed, 22 Apr 2020 09:34:46 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:59402) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jRFUP-0006VL-ON for qemu-devel@nongnu.org; Wed, 22 Apr 2020 09:32:35 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.90_1) (envelope-from ) id 1jRFUM-00036i-AB for qemu-devel@nongnu.org; Wed, 22 Apr 2020 09:32:33 -0400 Received: from us-smtp-delivery-1.mimecast.com ([205.139.110.120]:21864 helo=us-smtp-1.mimecast.com) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.90_1) (envelope-from ) id 1jRFUL-00032c-Rn for qemu-devel@nongnu.org; Wed, 22 Apr 2020 09:32:29 -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-360-MJLkgs73OHGSiNB18O8OKQ-1; Wed, 22 Apr 2020 09:32:26 -0400 Received: by mail-wr1-f70.google.com with SMTP id m5so1038733wru.15 for ; Wed, 22 Apr 2020 06:32:25 -0700 (PDT) Received: from x1w.redhat.com (116.red-83-42-57.dynamicip.rima-tde.net. [83.42.57.116]) by smtp.gmail.com with ESMTPSA id z1sm7749395wmf.15.2020.04.22.06.32.23 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 22 Apr 2020 06:32:23 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1587562348; 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=Flbegfe+XvQdIALgmwjud+bmSRqDw+xWJxrHvvD5T5c=; b=iNiwjnjl37XE94rLwo8a2bZjfZOMwhUClEss3Kvi318ESsk3t/fycrV6g8rjDkCYBGAVwZ 3H7VhucekKB6IGQQzKoNao5Utnqwx8UiHG0rhufdXL1/Cp+uYoJt7gVhKJObNtwqcSEF38 Pr/rVhAI6dVMhmsxYrckPBxxtIg8lMU= X-MC-Unique: MJLkgs73OHGSiNB18O8OKQ-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=IDUYtKOADkWG3CN25Uq5JJobV9Wdj+VxIMt3IxDdn/o=; b=JglobhJhsqNJJ+WooicgLoDMJ0rYCbc+R0S4XooRxjs8tmvlWg8kSd4biQnGO/qTZQ xuqZMya/sB4wGfhP/x4PQsp9EjVFb02HiG3q4BOdPfUlpFtRTffgWi/SOxLoia0GxDoJ LTZnPyB/NZfOOp7/lJ0rW5VSF9rkzd5KyZGGhgZ0xmd/JciR9V/qLqvS5cp3ip8nN3DO 5tJs1etl3zP/uKI2MLKtSBJ3kNyhMihG6lrOl8sb6fzSn8CKV43UeM4dyN1V6M9Jr9Xt JjpOP7kKtbK8r+UuxC/VABTruPn3op+vMfuIZkUC8ssqIVFIYRZsxwSRvTyuDxQQLvwz HgsQ== X-Gm-Message-State: AGi0PuahOTq8owNYO9StUbChMPfP3VT0FxF78xxyR54FF4JIP3uZrEbZ bW6O2ak5sQoJSkgrdKB26iNt0ao3s3sKSMBt+vRLGo83uTke4TPNaggGFvE97kbQtQzKtUf6FhN VGSlRm0oRL9V4llc= X-Received: by 2002:a05:600c:2941:: with SMTP id n1mr10810675wmd.25.1587562344696; Wed, 22 Apr 2020 06:32:24 -0700 (PDT) X-Google-Smtp-Source: APiQypK7XDTD/6gL7xOy+W7IIyAp8MGKyH7Nh9z0DkzZBiiFlF4pLRNLxX+BVWqJa70s13YF7ZBNHA== X-Received: by 2002:a05:600c:2941:: with SMTP id n1mr10810659wmd.25.1587562344515; Wed, 22 Apr 2020 06:32:24 -0700 (PDT) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Subject: [PATCH v3 6/9] hw/isa/i82378: Remove dead assignment Date: Wed, 22 Apr 2020 15:31:49 +0200 Message-Id: <20200422133152.16770-7-philmd@redhat.com> X-Mailer: git-send-email 2.21.1 In-Reply-To: <20200422133152.16770-1-philmd@redhat.com> References: <20200422133152.16770-1-philmd@redhat.com> MIME-Version: 1.0 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable 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; Received-SPF: pass client-ip=205.139.110.120; envelope-from=philmd@redhat.com; helo=us-smtp-1.mimecast.com X-detected-operating-system: by eggs.gnu.org: First seen = 2020/04/22 04:15:03 X-ACL-Warn: Detected OS = 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: qemu-trivial@nongnu.org, Alistair Francis , "open list:PReP" , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , =?UTF-8?q?Herv=C3=A9=20Poussineau?= 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 Reviewed-by: Alistair Francis Signed-off-by: Philippe Mathieu-Daud=C3=A9 --- 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 17 03:54:40 2024 Delivered-To: importer@patchew.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=1587562479; cv=none; d=zohomail.com; s=zohoarc; b=N160v8W0RnELrOdQIE7nqzDg/94BS2tlKxj7PMkzUnOdhixOjtP9EDKUGeeKrnTCHEFo0BR/fPDhw8DWoSpEMYw5pHZ7zjcU3s517wirXMXlqS/hIpTg4PkWbcZhVP9fpizz+Ffo8uwSOg7hielgMt6C1LbsdExmuH04yoiDQeM= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1587562479; 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=OeM0cBach7mM1Er+F+BdNF9X8Ccb7WYWiy4rdEvvNOc=; b=QtyfvXpkfv1d38BCmB5lPIPaprSoaq2eomOh96CYk4ZP1ocT2vhAHGCf4FL4biJr5H+aTBgIs4cobJjPKKDEBST/c4yINVaz5eJPDyqtDlNYUu+IdCjlxur+r5EC23FurnhtVmvPRNKlkQ2cuvft2mhEOhxxkg4raAChL3bpcW8= 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 1587562479738577.5137210831003; Wed, 22 Apr 2020 06:34:39 -0700 (PDT) Received: from localhost ([::1]:50738 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jRFWQ-0000Ka-4H for importer@patchew.org; Wed, 22 Apr 2020 09:34:38 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:59444) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jRFUS-0006aW-FW for qemu-devel@nongnu.org; Wed, 22 Apr 2020 09:32:36 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.90_1) (envelope-from ) id 1jRFUQ-0003JC-Sl for qemu-devel@nongnu.org; Wed, 22 Apr 2020 09:32:35 -0400 Received: from us-smtp-2.mimecast.com ([207.211.31.81]:28887 helo=us-smtp-delivery-1.mimecast.com) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.90_1) (envelope-from ) id 1jRFUQ-0003Bj-DF for qemu-devel@nongnu.org; Wed, 22 Apr 2020 09:32:34 -0400 Received: from mail-wm1-f70.google.com (mail-wm1-f70.google.com [209.85.128.70]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-435-SUqi1fXZO-eFEuGd0RIbXQ-1; Wed, 22 Apr 2020 09:32:31 -0400 Received: by mail-wm1-f70.google.com with SMTP id q5so793036wmc.9 for ; Wed, 22 Apr 2020 06:32:31 -0700 (PDT) Received: from x1w.redhat.com (116.red-83-42-57.dynamicip.rima-tde.net. [83.42.57.116]) by smtp.gmail.com with ESMTPSA id h2sm8578677wro.9.2020.04.22.06.32.28 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 22 Apr 2020 06:32:28 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1587562352; 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=OeM0cBach7mM1Er+F+BdNF9X8Ccb7WYWiy4rdEvvNOc=; b=fhwXBZYYHAaORZhy3KrTdCLre+3U7SdFr54J5qyq8YEuTBMUOFLmv8PoTggTasErViO/IR 1aUu6e50LJh6azFRcOOG8w7UxE/oBIxtA18cNVeZzwEmRYUCSeshPyTzWU5wpxqCnv7nQy UwrJmi51O/ypmwcqloEmdIIIsaqdjqA= X-MC-Unique: SUqi1fXZO-eFEuGd0RIbXQ-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=vqpHgk+Qg3xtVikhp88gaWQSBTFh1RmAeJyt0Yb24RI=; b=CQKVG5Fmm00sxEXkqJO/6kVF2cFqvv03QXCDmx63Jq8BIA66rFxZLZ8J4vJJKvk5aW lbk2K2TZGLSbVE+VkCrICcGQj4L6q6kkC4+xhIGO6Ky1la5bOmGS5cEnS6cGl1/5woYt AAXW2NU8szi21TMlIj6Tnt0vhOTLegds6dDmlwL1YdvZAEoKcekbThRorVd4LxDEU1LZ CjP0e5d25isJipF6f6M9p19CVofW+Ht6R8fPGHb+Ltnje1zujxlsJcjVA0WaKIuKrlwt B+996JrGIX+02i6fLTZRfbU/CBupX8n02GvBPEK6YrxauYE45QLh2+i0VlOH2n0y2a0U ztHw== X-Gm-Message-State: AGi0PuYdQPuo7/RvcP6OOHPUTVcVJULUpQN8u4wW1wg4QiRgdJh4GIeB sWRm43KYjNrWTKRU9FxsimdrW55n5GJZIxaSHlhUilmyh5uLDBmyiIVPC4JhJvEk7ugdYkydSB7 YfDDUYpwtOqFxhS0= X-Received: by 2002:adf:f2c5:: with SMTP id d5mr15624567wrp.285.1587562349781; Wed, 22 Apr 2020 06:32:29 -0700 (PDT) X-Google-Smtp-Source: APiQypKqP2JZu0BSj/TOBCxs0BuAVzdLzpqe0YF5jw7OFRSHEkPS9oqHh93G6IaEAztiWfHc587sIQ== X-Received: by 2002:adf:f2c5:: with SMTP id d5mr15624548wrp.285.1587562349602; Wed, 22 Apr 2020 06:32:29 -0700 (PDT) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Subject: [PATCH v3 7/9] hw/gpio/aspeed_gpio: Remove dead assignment Date: Wed, 22 Apr 2020 15:31:50 +0200 Message-Id: <20200422133152.16770-8-philmd@redhat.com> X-Mailer: git-send-email 2.21.1 In-Reply-To: <20200422133152.16770-1-philmd@redhat.com> References: <20200422133152.16770-1-philmd@redhat.com> MIME-Version: 1.0 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable 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; Received-SPF: pass client-ip=207.211.31.81; envelope-from=philmd@redhat.com; helo=us-smtp-delivery-1.mimecast.com X-detected-operating-system: by eggs.gnu.org: First seen = 2020/04/22 02:12:04 X-ACL-Warn: Detected OS = 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: Peter Maydell , qemu-trivial@nongnu.org, Andrew Jeffery , "open list:ASPEED BMCs" , Joel Stanley , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , =?UTF-8?q?C=C3=A9dric=20Le=20Goater?= 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 Reviewed-by: C=C3=A9dric Le Goater Signed-off-by: Philippe Mathieu-Daud=C3=A9 --- 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 17 03:54:40 2024 Delivered-To: importer@patchew.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=1587562860; cv=none; d=zohomail.com; s=zohoarc; b=h1QL9A5AkqsPvebELboKLwUvj4aq7BmuAFAUjAnnZxkVVcB64E2c4pSupw8BiXgij24gkUtQJesG2PSnGpRdafcaK2ojr5dUfjfq9hWVg5QYg3ddfaJ+GzDOQ30EVK3yNuMoI/jFoQ+cANObKSyEGk+Zp5yEkUUipOlxzeHg9ic= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1587562860; 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=2C4mjVc4GupZqidy/jN6Lg6n+I2oMBFVaLfmcbIurl0=; b=PhM7R2QX2jkY5B/Buk1SV0PRwsGkEDfINax/FY0O7xEILsF94mHpx+1+zBMq+hptRVp8ixvUrCLFHVzAMxayiYfMMX4w/kYYVVxrPPSwRbdOpE06rHhlvbaPgdocF9DESlSvCiexLYf9sv89Y4Av+A3ksM79JJGKQkMuI2PQ4Yk= 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 1587562860600442.2772452522074; Wed, 22 Apr 2020 06:41:00 -0700 (PDT) Received: from localhost ([::1]:50868 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jRFcZ-0002T0-0y for importer@patchew.org; Wed, 22 Apr 2020 09:40:59 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:59484) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jRFUV-0006iL-IM for qemu-devel@nongnu.org; Wed, 22 Apr 2020 09:32:39 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.90_1) (envelope-from ) id 1jRFUU-0003Xq-JD for qemu-devel@nongnu.org; Wed, 22 Apr 2020 09:32:39 -0400 Received: from us-smtp-delivery-1.mimecast.com ([205.139.110.120]:46491 helo=us-smtp-1.mimecast.com) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.90_1) (envelope-from ) id 1jRFUU-0003Rz-4n for qemu-devel@nongnu.org; Wed, 22 Apr 2020 09:32:38 -0400 Received: from mail-wm1-f70.google.com (mail-wm1-f70.google.com [209.85.128.70]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-170-sdVPOeqfP7C_xI7wKdjXDQ-1; Wed, 22 Apr 2020 09:32:36 -0400 Received: by mail-wm1-f70.google.com with SMTP id f81so809007wmf.2 for ; Wed, 22 Apr 2020 06:32:35 -0700 (PDT) Received: from x1w.redhat.com (116.red-83-42-57.dynamicip.rima-tde.net. [83.42.57.116]) by smtp.gmail.com with ESMTPSA id h5sm8860641wrp.97.2020.04.22.06.32.33 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 22 Apr 2020 06:32:33 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1587562357; 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=2C4mjVc4GupZqidy/jN6Lg6n+I2oMBFVaLfmcbIurl0=; b=Gf+80bbnZkPvcbufQhEQdBJ7zYPNmK/5fYf3Q7jUJcZLcBFvMddxjpTChD7oB9mr+MHks6 5cGvi4L+rCfpErz2IRuYZfqEOpis9SlrgAxn7WC+JQtDUDs1QcqJfB+MXWzj7g64AaIhaG AnTIKPIlrn3izv6ZbGLP8XPdhYot2fg= X-MC-Unique: sdVPOeqfP7C_xI7wKdjXDQ-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=Dq75PFzgynrFGY6/YI8kQB8GRBvNE4I9mXbmGtzIHFo=; b=s1bFYSh9wx2A+KtLN0ftoImqgv7AJ3fGslDbH5jnhIXdXChWELr3MDXFSxWkGYoMLD jViSNzJ71GRaGAGq0YpeKQKET1GmHCdJ87CFnvS9b8IYu8C9ja7YZMZjxrXdcOphhQI2 6JVIVoY2Doq2hmRcAy2BPScGQxqo0POsW7gz4gHvK4XAmmWOAwOL2MIpyUvaWNkR7Kee PJVW5g+Ft/LIl0pk3Nvj+fAFpKC8LAMzB7TZqV/TfrTlySARQDaZQO3dOm4bzthl3k/L 9tMH5jC7X2oC8MfEZ7AOG4a9Me1j8sumCuzWnmLK40leXOeL8N2snMgHUktlsGcTUhwr qkDg== X-Gm-Message-State: AGi0PuYwWGr/P1GvedoyAm71+OiKi/GaBjvc/LKp7vatFmwWhTAkAN8R iAFKpZm8Zx3lR4EY2j7chta17mFc+J49shztUGAgIadRTvy2zalLLb876RTN3Ylho1Yu16WwEyG i3n1Egg2J88EjncU= X-Received: by 2002:a05:6000:1001:: with SMTP id a1mr31239578wrx.9.1587562354687; Wed, 22 Apr 2020 06:32:34 -0700 (PDT) X-Google-Smtp-Source: APiQypL5S5fiw1pjeVHXAqixPkISK1j3A4uJRvzr0tgSExLtCfCpYkFUbSeWRoEQ0hralI1T6KA8dA== X-Received: by 2002:a05:6000:1001:: with SMTP id a1mr31239557wrx.9.1587562354470; Wed, 22 Apr 2020 06:32:34 -0700 (PDT) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Subject: [PATCH v3 8/9] hw/timer/stm32f2xx_timer: Remove dead assignment Date: Wed, 22 Apr 2020 15:31:51 +0200 Message-Id: <20200422133152.16770-9-philmd@redhat.com> X-Mailer: git-send-email 2.21.1 In-Reply-To: <20200422133152.16770-1-philmd@redhat.com> References: <20200422133152.16770-1-philmd@redhat.com> MIME-Version: 1.0 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable 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; Received-SPF: pass client-ip=205.139.110.120; envelope-from=philmd@redhat.com; helo=us-smtp-1.mimecast.com X-detected-operating-system: by eggs.gnu.org: First seen = 2020/04/22 04:15:03 X-ACL-Warn: Detected OS = 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: Peter Maydell , qemu-trivial@nongnu.org, Alistair Francis , "open list:STM32F205" , Alistair Francis , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= 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 Reviewed-by: Alistair Francis Signed-off-by: Philippe Mathieu-Daud=C3=A9 --- 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 17 03:54:40 2024 Delivered-To: importer@patchew.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=1587562759; cv=none; d=zohomail.com; s=zohoarc; b=bfr5iB+BlBQrEr+EvyRgmWyIbzierdJ7j01pB4kBl3111MR0/88hvu/Ip/oOmdSiwdY+uzufcSw+e54QsXIuXaoI46RJTas6Ly4P1IVoP5hhOrhYs2rp2pT2IIMwTHqdXY1oWyMpNDOsUi2Kfe+r+LoYpdrKbfuk4ygKKr1Tpvk= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1587562759; 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=0kil7rh5PLCfhjtcevVysxbFfatlucuUN8GB4YOzVHM=; b=Niszbe79VhqtQB7TeEz7W2lVqWgpJ0jH25juhKs2VjJ9JKi2jdOAYjiFpVNQtNivCOJ+4HGsVInAuQ777RregWY/kEb5ytbYzQFSimTUoKMNb+NsJNSP9wkceRd+CktgknzJD53qLYAkg2R7XxKP9EPuwdnk/ZBa6GFJYVlzHwQ= 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 1587562759402570.3290539702217; Wed, 22 Apr 2020 06:39:19 -0700 (PDT) Received: from localhost ([::1]:50828 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jRFaw-00006t-6X for importer@patchew.org; Wed, 22 Apr 2020 09:39:18 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:59600) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jRFUc-0006w1-Eu for qemu-devel@nongnu.org; Wed, 22 Apr 2020 09:32:48 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.90_1) (envelope-from ) id 1jRFUa-0003w2-Gd for qemu-devel@nongnu.org; Wed, 22 Apr 2020 09:32:46 -0400 Received: from us-smtp-2.mimecast.com ([205.139.110.61]:28269 helo=us-smtp-delivery-1.mimecast.com) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.90_1) (envelope-from ) id 1jRFUY-0003nq-Vf for qemu-devel@nongnu.org; Wed, 22 Apr 2020 09:32:44 -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-330-qglXYJT-Mh2T67zQ2J5T_A-1; Wed, 22 Apr 2020 09:32:41 -0400 Received: by mail-wr1-f71.google.com with SMTP id j16so1028794wrw.20 for ; Wed, 22 Apr 2020 06:32:40 -0700 (PDT) Received: from x1w.redhat.com (116.red-83-42-57.dynamicip.rima-tde.net. [83.42.57.116]) by smtp.gmail.com with ESMTPSA id 19sm7525564wmo.3.2020.04.22.06.32.38 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 22 Apr 2020 06:32:38 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1587562362; 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=0kil7rh5PLCfhjtcevVysxbFfatlucuUN8GB4YOzVHM=; b=H0vLJ5d2YEnKS/TS154KBCk7ai+9qSk/0Sl2N4t9qBud8ocmsy4MrDsw2sXq4dtDKCqpED S3ugYeSKc/e/bNH74Kl+MY2iAbrbxmRy2r+X3PdCGw/v8XDMQpviuBgLFdwwSZXsAdqLnM wOcs3sQtq8wNuQt1TF7QsRHankYcakY= X-MC-Unique: qglXYJT-Mh2T67zQ2J5T_A-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=vNxCN6M06rXiAjKleOKzOmRwlxNeGgf99J9DO/nchhk=; b=SorS14jm2m0/bhrFkHnd6uN3Wpblel0HyuuUPl0mrUb88IMcgZdepTT4AC9aCS0cAi njGZlGWKd+PPNYeTP2dghULMYsIOSCS36VN8ld6cu8ro0ymT9b93Xg7aHz5YtK88Snhl 1S3m2xjKRD4bE84P2ifzvnkYk7/8XUOtb/eRjpYX32V9evtpXWs9bOBjCgNavw7mOSiF y4mnzMdAl/Y8f+SK71vhFBeVqQBzqNm3NMQyFquQJQ7wusmPvLIDIx3PAXMohW2kJY1q EP2AdmTwq4C5l7zOy2UwLsrFgoGe0/UDt6zioL9Z2jFse7BKJDTz2RwtGDWWRPF8qVlT otNw== X-Gm-Message-State: AGi0PuZjaeVpzOXVhoa4Rzxd9vkdSy1MbIayFJWQvbzvj/1cg7S0f1DC Npq00jhuDveLuCGnxLRkxPAOh8meVLqk8mi7Ve+fvPVEDhKbfettzzSSamE1Fl+0JT7J02jqynB S+WGDLYzB4en4W0k= X-Received: by 2002:adf:ea44:: with SMTP id j4mr32086535wrn.38.1587562359420; Wed, 22 Apr 2020 06:32:39 -0700 (PDT) X-Google-Smtp-Source: APiQypLNL1kfi8mJTmgXfQFHY/uEF7HT0TawYfHGk35xmUGa5VK+gFzIu5dhO9Vpux9XAtjya1pDzA== X-Received: by 2002:adf:ea44:: with SMTP id j4mr32086518wrn.38.1587562359264; Wed, 22 Apr 2020 06:32:39 -0700 (PDT) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Subject: [PATCH v3 9/9] hw/timer/pxa2xx_timer: Add assertion to silent static analyzer warning Date: Wed, 22 Apr 2020 15:31:52 +0200 Message-Id: <20200422133152.16770-10-philmd@redhat.com> X-Mailer: git-send-email 2.21.1 In-Reply-To: <20200422133152.16770-1-philmd@redhat.com> References: <20200422133152.16770-1-philmd@redhat.com> MIME-Version: 1.0 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable 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; Received-SPF: pass client-ip=205.139.110.61; envelope-from=philmd@redhat.com; helo=us-smtp-delivery-1.mimecast.com X-detected-operating-system: by eggs.gnu.org: First seen = 2020/04/22 02:57:52 X-ACL-Warn: Detected OS = Linux 2.2.x-3.x [generic] X-Received-From: 205.139.110.61 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: Peter Maydell , qemu-trivial@nongnu.org, "open list:PXA2XX" , Alistair Francis , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= 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 Reviewed-by: Alistair Francis Signed-off-by: Philippe Mathieu-Daud=C3=A9 --- 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