From patchwork Wed Aug 14 23:36:40 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Pierrick Bouvier X-Patchwork-Id: 819156 Delivered-To: patch@linaro.org Received: by 2002:adf:cd01:0:b0:367:895a:4699 with SMTP id w1csp921063wrm; Wed, 14 Aug 2024 16:38:27 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCXKpDiRWtq++T4Oi78GAk/SlJOMBquf2z+6knjcTN7SV0LZmRRfNfENuZ4eibve1Wb4Dy+nPn/BZFHU6M1tDDqi X-Google-Smtp-Source: AGHT+IH6sqPXIpOzWHQHjecLZDbu3Ct5VLNA9eTrsADis5h0y07ws7jlq7j/H3HLu1xtvpkp35Pf X-Received: by 2002:a05:6214:4685:b0:6b2:cf9e:866 with SMTP id 6a1803df08f44-6bf5d15a546mr45137156d6.4.1723678707578; Wed, 14 Aug 2024 16:38:27 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1723678707; cv=none; d=google.com; s=arc-20160816; b=LTFCO2TDF8fKNK+yeE/Ep4v+j1C1RrIRYl2CLU7/N74N5eGYQ09aQbe4s4wvtyxUl0 hSwhW6IQ4HIJmwrvn/lgwNl1I4CQVmZF/F/gJ9DEUV/Of8x83z9Z4kbHmg10UHxtmMGP 2G3vGp+s4cy6ptdb3qT90rdLs1sIAqFVRIWfmKvMGuBdGLEjd7Jzf3nofbU4Z7laivDU cD0VHJptATfIpnd8fgp32/3l4CNPOs8m7BuKAG90NLgUA3NFRy12id54fxlX8UY51lFf iBvJRw0VYAOjB+nV2y4rzdVbKUtLsWb+6MQ0VvDAfDzV/Xl+K4oXfAnUm6CoTmv81iQm gNdA== 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=I0fMYCzEpAflnqdXJ+mHKpT1nx2a+UfFr0qfxTWmEKw=; fh=oXkr8tRtU3V0Y/ys4wmfLP1vjmnh5XTVxxercrnp+aA=; b=CzKKF2hFS5RWH3+yfCj/qaxi/M2c3FXbtPzI5mPtJe5PCxt1ub025QPREzX72Cae66 ia2t2lnxrt6HAJ0GBBW8W4lAJJxZEiyc76aBkPXN3eIL/4SgdpWMEfcjHnDQzimLsNmP bP0dGyBD8hICxSy7bZ357Unw1vTQ7BRuOwXveD4+vZrIhoesAtfmZaNzABAb68eIWTc8 wF03Gc0sj2rSZy6RVnVE+ZGimNP2LQFpDvhGKNKdU9gEdpw9pvkxARkCGrNxC2jDAgQt juNcBbndDRO8sA0vUg1u3SUKwD02PbGQat+dbEv6PwNfs2yPbbx+Z3fXNwAg/UvS0biH uCcA==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=qEDVlhdf; 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; dara=neutral header.i=@linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id 6a1803df08f44-6bf6feec68esi3642516d6.359.2024.08.14.16.38.27 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Wed, 14 Aug 2024 16:38:27 -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=qEDVlhdf; 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; dara=neutral header.i=@linaro.org Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1seNY4-0001dJ-E0; Wed, 14 Aug 2024 19:37:00 -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 1seNY3-0001cq-Pf for qemu-devel@nongnu.org; Wed, 14 Aug 2024 19:36:59 -0400 Received: from mail-oa1-x2c.google.com ([2001:4860:4864:20::2c]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1seNY2-0006Vt-Az for qemu-devel@nongnu.org; Wed, 14 Aug 2024 19:36:59 -0400 Received: by mail-oa1-x2c.google.com with SMTP id 586e51a60fabf-26ff51294c4so340074fac.3 for ; Wed, 14 Aug 2024 16:36:56 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1723678616; x=1724283416; 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=I0fMYCzEpAflnqdXJ+mHKpT1nx2a+UfFr0qfxTWmEKw=; b=qEDVlhdfP5D+8PmPImILA+del3wTY+XKpl1XKwhLzzkr3jR6N0o6x/61UHdPdeuImh PoBQ+ca2wa3J1UN90BEM5q7L/7/w3p2rEXOpnjWIWnRBQcIhGfbXLfI0Qy/3bRLdn3eW /TCCt5878TjbsaG9q1FWz5hMkNGDW60kMt0RT/+2y0dvMnrQq6lYYdKQxCsQaxklSsgK NAZCV5HCO9/VkbhJ/tf2EsljnzMXG/WFXKKp04BZ7KPgSB82oER0qCh0d9PC4xx4kPk8 SoWxiRuxvHY57Fn6pBYvEVkBd1kqL8Gxf5DpVHITLbPn5KadZF1j/miz2npUdqJmc9Ae GkZA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1723678616; x=1724283416; 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=I0fMYCzEpAflnqdXJ+mHKpT1nx2a+UfFr0qfxTWmEKw=; b=rqxwMG4HKH7z6DTol++Vyxdx0BymIgnZyDOeYiA4Pnz+zJpbTwb8LzkZs5nIuUvC5P DfCTMmgUJ+5TGZNX0zeYmq63xCmKlD2jEvSybza4jrg32wB0P4MD/giGSq4mUBI4Aipk 4G4recDQbWjwNL2kSpRcxNnNeCJ7VJ3bBAYZeuJ8KL0gTZOke+dov7JM5emQHh1lelwK wOccmEm0fosi0aKDDDiP2zqX5SH49UruusK51O/JuYxV5uQJmA5HU5BAMRHg67nALVH9 cBmwBq5Vg6rJC9Dk3EJgkEJLDqvn4ghw5oT5J4E/Krbuh4yrLdReujuaLL2u6AuTFDG0 hn/A== X-Gm-Message-State: AOJu0YxP5XlN2NXrky1Df+fypqXymTWFudg1CKSTmAAUW8UkWTYaAxAw G3OodzTaJ4NyhxMDf2yu/nJHo7dKnn2CzKnZ0vtEygyjD7pgmz/YxUlUMf+Xc/ne6j3ywrsh7kD qcAE= X-Received: by 2002:a05:6871:205:b0:260:e7ed:27f4 with SMTP id 586e51a60fabf-26fe5a97efemr5249384fac.27.1723678615795; Wed, 14 Aug 2024 16:36:55 -0700 (PDT) Received: from linaro.vn.shawcable.net ([2604:3d08:9384:1d00::b861]) by smtp.gmail.com with ESMTPSA id d2e1a72fcca58-7127aef57dfsm112164b3a.115.2024.08.14.16.36.54 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 14 Aug 2024 16:36:55 -0700 (PDT) From: Pierrick Bouvier To: qemu-devel@nongnu.org Cc: =?utf-8?q?Alex_Benn=C3=A9e?= , Paolo Bonzini , Mahmoud Mandour , =?utf-8?q?Daniel_P=2E_Berrang=C3=A9?= , Alexandre Iooss , Thomas Huth , Pierrick Bouvier , =?utf-8?q?Marc-Andr=C3=A9_L?= =?utf-8?q?ureau?= , =?utf-8?q?Philippe_Mathieu?= =?utf-8?q?-Daud=C3=A9?= Subject: [PATCH 1/6] contrib/plugins/execlog: fix warning Date: Wed, 14 Aug 2024 16:36:40 -0700 Message-Id: <20240814233645.944327-2-pierrick.bouvier@linaro.org> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20240814233645.944327-1-pierrick.bouvier@linaro.org> References: <20240814233645.944327-1-pierrick.bouvier@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2001:4860:4864:20::2c; envelope-from=pierrick.bouvier@linaro.org; helo=mail-oa1-x2c.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, T_SCC_BODY_TEXT_LINE=-0.01 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 Found on debian stable. ../contrib/plugins/execlog.c: In function ‘vcpu_tb_trans’: ../contrib/plugins/execlog.c:236:22: error: declaration of ‘n’ shadows a previous local [-Werror=shadow=local] 236 | for (int n = 0; n < all_reg_names->len; n++) { | ^ ../contrib/plugins/execlog.c:184:12: note: shadowed declaration is here 184 | size_t n = qemu_plugin_tb_n_insns(tb); | Signed-off-by: Pierrick Bouvier Reviewed-by: Thomas Huth Reviewed-by: Alexandre Iooss --- contrib/plugins/execlog.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/contrib/plugins/execlog.c b/contrib/plugins/execlog.c index 1c1601cc0b4..d67d0107613 100644 --- a/contrib/plugins/execlog.c +++ b/contrib/plugins/execlog.c @@ -181,8 +181,8 @@ static void vcpu_tb_trans(qemu_plugin_id_t id, struct qemu_plugin_tb *tb) bool check_regs_this = rmatches; bool check_regs_next = false; - size_t n = qemu_plugin_tb_n_insns(tb); - for (size_t i = 0; i < n; i++) { + size_t n_insns = qemu_plugin_tb_n_insns(tb); + for (size_t i = 0; i < n_insns; i++) { char *insn_disas; uint64_t insn_vaddr;