From patchwork Mon Sep 4 16:12:29 2023 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: 719986 Delivered-To: patch@linaro.org Received: by 2002:adf:d08b:0:b0:31d:da82:a3b4 with SMTP id y11csp1685976wrh; Mon, 4 Sep 2023 09:14:37 -0700 (PDT) X-Google-Smtp-Source: AGHT+IGWPj+HHqNqE6xcHKWlTlsyQRiM7Eme+cDw+zo7/eFS4QVNCQ5XVXpeLZ4dRPgovmrvtrVX X-Received: by 2002:a05:6808:1687:b0:3a9:ba39:6d6e with SMTP id bb7-20020a056808168700b003a9ba396d6emr14515804oib.0.1693844077730; Mon, 04 Sep 2023 09:14:37 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1693844077; cv=none; d=google.com; s=arc-20160816; b=Gv8Nla553YAGfuxLLC0iY9lLwuiY9ObGa6JrS1Um4s1J4t52nXzMRCCJBLV3mrznTb 09AJTU2XXhG9GziFwn2voWCCY006/Xl6O6vIRxzimaCg+4U/hlaf4S96HYP6CIaakTW+ Tl9Qrf+4I6z98l2RrYDh8JwRMjD2F2oy9/xlNSQm2PLJZyFue6guoE2FnAM48POVN3h9 N98+GijEoK/x1ymw2OeK+2VLWMjBKCG81DwMZE7rdzCCAUBxQO/OZ/IYLKWbhk5fGnZu D8trK+LirTKkc+CLfP/yFTabOBSERW6juw841iEGso7Juz+unCor3ByxAYAb2qKqpivG 51eA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=GqyVChgV4Vj161YIUXKzjrwgE8pMJ/b2rFt1vVL3b7M=; fh=GWW/XA6BWPtMHuiUXaWtah8gQMMsZK954cP6EeU8A+k=; b=YqUKf06YItdx+IYKVU6sU0/7CTnX/5D9y8ebdWun6Xxe6PBhW32WTmXeLxVqiWFNnA a0AN6QdTvcyECUtZXpZfA/DeqId54HMByTc40n1e+Qig5Dcg6g9qaxziwdSx4cIFcvqY cr5e0C+3AjaLtMSbdsQ2PcTq85+wX76RlpCDSxYj9aUpH2GzkR7ryHKq4QuW/wrfAC7y NlK94+6eZGDdFluhBPcACzrLS1yF9pHoigXD1jaZcCVQ3OzNB6fr+RzeYSRmVwHoS4E+ S3vf4Z7ocrva8II27n/tittQBvfVmqdBN7foKQuP195exrx2jBzB4aW7U16QcnmVB25E GP9Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=pCCsATJL; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id d1-20020a0ce441000000b0064f4a9760basi6645973qvm.317.2023.09.04.09.14.37 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Mon, 04 Sep 2023 09:14:37 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=pCCsATJL; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qdCDT-0004vj-N8; Mon, 04 Sep 2023 12:14:19 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qdCDS-0004pi-4X for qemu-devel@nongnu.org; Mon, 04 Sep 2023 12:14:18 -0400 Received: from mail-ej1-x632.google.com ([2a00:1450:4864:20::632]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1qdCDP-0007jL-Pa for qemu-devel@nongnu.org; Mon, 04 Sep 2023 12:14:17 -0400 Received: by mail-ej1-x632.google.com with SMTP id a640c23a62f3a-9a5e37a39ecso222712566b.3 for ; Mon, 04 Sep 2023 09:14:15 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1693844054; x=1694448854; darn=nongnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=GqyVChgV4Vj161YIUXKzjrwgE8pMJ/b2rFt1vVL3b7M=; b=pCCsATJL3H4tkq+4Dj3YzwlVBYwfaHMhjpDGU42h4wEOkXFBs8nKP9JzF8eCX+waEM ljqfe56qr+rCQDnsBKAsjWLMR/u9OnzxEOyFAwxYG82/GbOq8megdNkrd3AoRp6TGjZg H12hiFwxGywlB2+trbsCKDmwRr5DEdM/T0g3MhYnGB2M1azBa2XxNjenOW3Wd3kyvd/f d/05fICYAUPyHyx1jpZZMPHiToJUHpCyOglYdzWAWsgbBzA1K8u2xDEH83FhU8rjYbPX 0BVC8I9L9IIFjYSySHloBxpZIBqv6M4YMsoW/p5YYpZVjsub12NCj35SiJwXr2nw4iq/ 7QrA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1693844054; x=1694448854; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=GqyVChgV4Vj161YIUXKzjrwgE8pMJ/b2rFt1vVL3b7M=; b=jpRmZkSN7sZ0as8p9j1mHrniZ11siHqR1ENwQOJFXOAnSydg5ych52SlHrgLXFbR4D N1vK5bZfsiqgNmR06moWqFCdw0znREoZDsQlnIhJdF9ozaPSooke0Gxi65cuFNN8cjBn ziqlUlU79Fa/pWJ63KqbNuQHDQAy45BkP8DcwNSSAk7FdCWiPv+yQ2R0jK704p9FCpL5 C2A0JSetwx0iFzXExv5uL+QUWi7wr0kHLPtS8zjUyHLYKppIBhheci78aTM5oXauR4mV 9WJC/U8PgmkiZJk9SP51RM8+wp/HAwdN3S8hVIa5QoRmRirfLnZ18+SxsgGvlpv5WDRD vgdA== X-Gm-Message-State: AOJu0Yx+HiVqb+jkwHDVClLhATESjTHAI6COBGlA9ISC68NiTTsnLlXG wr6EppwqCB1tr/J8LF4e6e3D7Q== X-Received: by 2002:a17:906:1daa:b0:9a6:5696:3879 with SMTP id u10-20020a1709061daa00b009a656963879mr1888248ejh.65.1693844054414; Mon, 04 Sep 2023 09:14:14 -0700 (PDT) Received: from m1x-phil.lan ([176.187.209.227]) by smtp.gmail.com with ESMTPSA id p27-20020a17090635db00b00991d54db2acsm6338492ejb.44.2023.09.04.09.14.13 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Mon, 04 Sep 2023 09:14:14 -0700 (PDT) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: Markus Armbruster , qemu-devel@nongnu.org Cc: qemu-block@nongnu.org, qemu-arm@nongnu.org, =?utf-8?q?Philippe_Mathieu-D?= =?utf-8?q?aud=C3=A9?= , Coiby Xu Subject: [PATCH v2 17/22] util/vhost-user-server: Clean up local variable shadowing Date: Mon, 4 Sep 2023 18:12:29 +0200 Message-ID: <20230904161235.84651-18-philmd@linaro.org> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20230904161235.84651-1-philmd@linaro.org> References: <20230904161235.84651-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::632; envelope-from=philmd@linaro.org; helo=mail-ej1-x632.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org Fix: util/vhost-user-server.c: In function ‘set_watch’: util/vhost-user-server.c:274:20: warning: declaration of ‘vu_fd_watch’ shadows a previous local [-Wshadow=compatible-local] 274 | VuFdWatch *vu_fd_watch = g_new0(VuFdWatch, 1); | ^~~~~~~~~~~ util/vhost-user-server.c:271:16: note: shadowed declaration is here 271 | VuFdWatch *vu_fd_watch = find_vu_fd_watch(server, fd); | ^~~~~~~~~~~ Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Michael S. Tsirkin --- util/vhost-user-server.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/util/vhost-user-server.c b/util/vhost-user-server.c index cd17fb5326..5073f775ed 100644 --- a/util/vhost-user-server.c +++ b/util/vhost-user-server.c @@ -271,7 +271,7 @@ set_watch(VuDev *vu_dev, int fd, int vu_evt, VuFdWatch *vu_fd_watch = find_vu_fd_watch(server, fd); if (!vu_fd_watch) { - VuFdWatch *vu_fd_watch = g_new0(VuFdWatch, 1); + vu_fd_watch = g_new0(VuFdWatch, 1); QTAILQ_INSERT_TAIL(&server->vu_fd_watches, vu_fd_watch, next);