From nobody Wed Nov 27 21:47:33 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; 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=pass(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1696845840; cv=none; d=zohomail.com; s=zohoarc; b=Gf71LS31tFUV2Nxr4WGUC5viutL6tQW+hgmriw6dz7KgeFDNjW1C7eU3naYfWgkpvpi+7S3LCRUalG8B1nAPxF+gMnYoQoBIifg7uGjJZsPnAGuH7HIeQPoqi+TZ8weJrbbjoE32jDW6IZLZFWljlGsbV1liCIHEUM4wf7xIa1w= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1696845840; h=Content-Type:Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=wt6aiJAngF+1rHQyivcpsZ85UBVqDOe5WBHF8BS6ZcM=; b=PMjHLG7LsrWXQw5Obi0VwqyPHbstHxGr/ftOKtb9ncOEin/AIKzNbUfcF/+sB07HxbQR7Z1ESF416wWnYYPQ8d2WYo+QttOKIeyKZHtCcr5h5iar3j8E8iGRddJkymM4Nv8/3hVvNy8ehnBKLeLt6UPsKfP5yPMPZFVCReelP68= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; 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=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1696845840065195.64496612307403; Mon, 9 Oct 2023 03:04:00 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qpn6p-0003CE-Un; Mon, 09 Oct 2023 06:03:32 -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 1qpn6V-000358-DG for qemu-devel@nongnu.org; Mon, 09 Oct 2023 06:03:13 -0400 Received: from mail-wm1-x336.google.com ([2a00:1450:4864:20::336]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1qpn6P-00008j-Qf for qemu-devel@nongnu.org; Mon, 09 Oct 2023 06:03:07 -0400 Received: by mail-wm1-x336.google.com with SMTP id 5b1f17b1804b1-40572aeb73cso39562275e9.3 for ; Mon, 09 Oct 2023 03:03:02 -0700 (PDT) Received: from m1x-phil.lan (thr44-h01-176-170-217-185.dsl.sta.abo.bbox.fr. [176.170.217.185]) by smtp.gmail.com with ESMTPSA id v6-20020adff686000000b0031980294e9fsm9054813wrp.116.2023.10.09.03.02.58 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Mon, 09 Oct 2023 03:02:59 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1696845780; x=1697450580; 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=wt6aiJAngF+1rHQyivcpsZ85UBVqDOe5WBHF8BS6ZcM=; b=PaZFK/qWUOpEWgz3aCM6roj84qUETeZCRrAWDU1Nalz0qMiavJQ/1fH9RCLgY1lvz/ HxnUBE0zNeB1cMa+bSk1YJa9j2oT25GjfiQqQZpbyWk7LARaLkfgVjTjP4vS5n71/XhM 3yGX2/r//zM7tMOL8Vq8PsM4MLEe0xoXk3WtB5OgXfU3Fva/NwEmLD9RhfCeGWnalYqx nRva6SoCPUXSwSKfBv9ZsF47p6+IgDzKCmNcZhU876+zTWRcd+LK1U6NISP1s9HtqdDP +5pXrn7aGXwRkPLMYfoyB4NGp7CAl1M/3HDJ5dpiHjUImCgTOZ3NrIadNBSiwlRBQuLG SZAA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1696845780; x=1697450580; 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=wt6aiJAngF+1rHQyivcpsZ85UBVqDOe5WBHF8BS6ZcM=; b=vDGlx5c5MLXD93ZaqyPR5PeBBNXxooOjYOhrieIbsbyvWnN0xWziOL0fIdGFddBNSB S5OXjXCH71ZN3XYLbcd7HbXU071pX/3H8zLt+qDdClw4EwcQ0LMxOnRdnBHisY3oQAK8 2oCmIg7633SoLIUPIYmctshn86/fluKLjvwH/vWb1BKWVrf4zXY52wJaMOnMF9HvcElL 5wUHmv/u8XZBbeu3gT6bX6panjJWZ+rBjNIlPN1+XMrMjV4XzwLHRGGS6gloF3h0xvW0 Y22NV9BSa8Dlia8dVjqDeWc2Gy1a3gxOTyS8rpBcftnKQwrnrL2j+HZaivyNo0vqLG8b lHuQ== X-Gm-Message-State: AOJu0Yx0GUlxurvaY3Yr7cP/sSN7Lg6IDxzi6pvsz+zc+4k+bIdwD7Y0 w2AdF/YFmnfGNGBCoItbxgUBb0Z3vOPMw6zM+vI= X-Google-Smtp-Source: AGHT+IGwkZSg+joHT24dMZ1WFsuknuULHGcBmy67Rlf5ihuFrLxd446Pk2bDYSGTsnWRhzWOto+btw== X-Received: by 2002:a5d:4d12:0:b0:31f:f9a9:a742 with SMTP id z18-20020a5d4d12000000b0031ff9a9a742mr12146379wrt.23.1696845780208; Mon, 09 Oct 2023 03:03:00 -0700 (PDT) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: qemu-arm@nongnu.org, Alberto Garcia , Hao Wu , Kevin Wolf , Thomas Huth , Laurent Vivier , Paolo Bonzini , qemu-block@nongnu.org, John Snow , Stefan Hajnoczi , Fam Zheng , Tyrone Ting , Markus Armbruster , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= Subject: [PATCH 01/10] system/qtest: Clean up global variable shadowing in qtest_server_init() Date: Mon, 9 Oct 2023 12:02:42 +0200 Message-ID: <20231009100251.56019-2-philmd@linaro.org> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20231009100251.56019-1-philmd@linaro.org> References: <20231009100251.56019-1-philmd@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" 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=2a00:1450:4864:20::336; envelope-from=philmd@linaro.org; helo=mail-wm1-x336.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=unavailable 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+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @linaro.org) X-ZM-MESSAGEID: 1696845841748100003 Rename the variable to fix: softmmu/qtest.c:869:13: error: declaration shadows a variable in the glob= al scope [-Werror,-Wshadow] Object *qtest; ^ softmmu/qtest.c:53:15: note: previous declaration is here static QTest *qtest; ^ Signed-off-by: Philippe Mathieu-Daud=C3=A9 Reviewed-by: Thomas Huth --- softmmu/qtest.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/softmmu/qtest.c b/softmmu/qtest.c index 35b643a274..7964f0b248 100644 --- a/softmmu/qtest.c +++ b/softmmu/qtest.c @@ -866,7 +866,7 @@ void qtest_server_init(const char *qtest_chrdev, const = char *qtest_log, Error ** { ERRP_GUARD(); Chardev *chr; - Object *qtest; + Object *qobj; =20 chr =3D qemu_chr_new("qtest", qtest_chrdev, NULL); if (chr =3D=3D NULL) { @@ -875,18 +875,18 @@ void qtest_server_init(const char *qtest_chrdev, cons= t char *qtest_log, Error ** return; } =20 - qtest =3D object_new(TYPE_QTEST); - object_property_set_str(qtest, "chardev", chr->label, &error_abort); + qobj =3D object_new(TYPE_QTEST); + object_property_set_str(qobj, "chardev", chr->label, &error_abort); if (qtest_log) { - object_property_set_str(qtest, "log", qtest_log, &error_abort); + object_property_set_str(qobj, "log", qtest_log, &error_abort); } - object_property_add_child(qdev_get_machine(), "qtest", qtest); - user_creatable_complete(USER_CREATABLE(qtest), errp); + object_property_add_child(qdev_get_machine(), "qtest", qobj); + user_creatable_complete(USER_CREATABLE(qobj), errp); if (*errp) { - object_unparent(qtest); + object_unparent(qobj); } object_unref(OBJECT(chr)); - object_unref(qtest); + object_unref(qobj); } =20 static bool qtest_server_start(QTest *q, Error **errp) --=20 2.41.0 From nobody Wed Nov 27 21:47:33 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; 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=pass(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1696845900; cv=none; d=zohomail.com; s=zohoarc; b=dP4baBOl+1vtGcWbnkHZYbSxwgQga+Hu53ZS2gcv63MSt6di5Izacuew4Wpakswr0UT7tp+h4CXBKB+hHpV4QViappot+nMZHLaojhb/hGdCAcR/rP8nrKHXOWlZvUAtmxJV8UJEiCBMXE/7Mr5ZvtPlVUf52ho6rN8r1835fv4= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1696845900; h=Content-Type:Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=zRojbwnUlDvXIlWaYRNObAm149GLlZOkoyr1o1S54zA=; b=oJ9I9ZU8XBXLOm+VzxIq7POKK8bdBlhG5KxHCO5HbjMoZHpjRpomYHciSUd+C2IO+ZKdhNzFyPQOhcB4XH0U267DhlJcFhWaBHH2lS9PWrt53cgPwV+wbnIBALBdz9ru0PCWp+dMpH5bD7pzVoG2p2AutU8WxyQMZK6FDExBI24= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; 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=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1696845900591607.8768270342949; Mon, 9 Oct 2023 03:05:00 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qpn71-0003Qx-UV; Mon, 09 Oct 2023 06:03:43 -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 1qpn6l-0003Bi-7K for qemu-devel@nongnu.org; Mon, 09 Oct 2023 06:03:30 -0400 Received: from mail-lj1-x235.google.com ([2a00:1450:4864:20::235]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1qpn6V-00009P-BP for qemu-devel@nongnu.org; Mon, 09 Oct 2023 06:03:24 -0400 Received: by mail-lj1-x235.google.com with SMTP id 38308e7fff4ca-2bffa8578feso51914931fa.2 for ; Mon, 09 Oct 2023 03:03:07 -0700 (PDT) Received: from m1x-phil.lan (thr44-h01-176-170-217-185.dsl.sta.abo.bbox.fr. [176.170.217.185]) by smtp.gmail.com with ESMTPSA id e17-20020a05600c219100b0040646a708dasm10696156wme.15.2023.10.09.03.03.04 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Mon, 09 Oct 2023 03:03:05 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1696845786; x=1697450586; 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=zRojbwnUlDvXIlWaYRNObAm149GLlZOkoyr1o1S54zA=; b=CB8yS5HL9TFgucBwsoEMCMJZXm9I3uQ/xQcGPzTAY76ip6G0ZFxOmICMH0crMa16XV IncQ6CQOND1qNV7R5EuMX31WB37oeOXVkkRnsS6wpFa9igKAlmuMx+DPlF6VkDgOha95 GbK8YIdg5J2WPqIRGZFlDNknQGhq4YGwEt8eG1p4RC5MRihG1OkLQzAumw8KwwYVHCvR Clpj6gK/cWvyg4wumhjw8IxPbJy1w1DVSMxSTR/tykh+7yxGy2ZdnLY3EV5bx6k1UU3t kyHxCiNMXDkhCMoYxrk49fNeMTn+Tn15YUhMaqfssMnNDAJiW0CUG56pN30fOtctORyV fbjQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1696845786; x=1697450586; 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=zRojbwnUlDvXIlWaYRNObAm149GLlZOkoyr1o1S54zA=; b=DocqqOULvAWDt2nI9NLDmw5rOocvTMzV5U5iDRT3geMxCsZ89Nmm7ItfzSbZ4CshyQ i9DjyJ0QSpEkeR1uK5qwh6XTz6o43lbxgUqDnioKC3RnUg+IYGWrA0cQIePKuRcosib+ ciNgW+TpsCX2O8oPoyWlOyRbpu5LeiBCz6AzAj9/0Ca2L8EaZ5VlQah/bpwZ4Sc+Q0P5 yXMRACQHyG47kdOL3Qjl1wb5xM72ABUd8XWJ0XfJjH3gGI5/G8L2FsFWIQN8vcqJH2yl Q42swun2yPXjgbt4oLkBZunF6NGRZl1XLd1TEBYEwGlNbeuqz8Nd8cpx2TFuFAryEEoX DAjw== X-Gm-Message-State: AOJu0YyKAh7v9YOipYGb/588GatOIlpj/qOOiH1BUmvI2+5nL199HL3i pcIX2UbmFCumB7qJ6/G9VaAiDbUfcDTyH/di9o4= X-Google-Smtp-Source: AGHT+IEgTNUVksOYqKDUwkDF8wBv+wI99yUEB2BpfktJ5354uiq5gGdtA30CQ1wxFo2ljRQromq7EQ== X-Received: by 2002:a05:6512:3447:b0:500:7efe:313c with SMTP id j7-20020a056512344700b005007efe313cmr11157068lfr.24.1696845786199; Mon, 09 Oct 2023 03:03:06 -0700 (PDT) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: qemu-arm@nongnu.org, Alberto Garcia , Hao Wu , Kevin Wolf , Thomas Huth , Laurent Vivier , Paolo Bonzini , qemu-block@nongnu.org, John Snow , Stefan Hajnoczi , Fam Zheng , Tyrone Ting , Markus Armbruster , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= Subject: [PATCH 02/10] tests/throttle: Clean up global variable shadowing Date: Mon, 9 Oct 2023 12:02:43 +0200 Message-ID: <20231009100251.56019-3-philmd@linaro.org> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20231009100251.56019-1-philmd@linaro.org> References: <20231009100251.56019-1-philmd@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" 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=2a00:1450:4864:20::235; envelope-from=philmd@linaro.org; helo=mail-lj1-x235.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, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=unavailable 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+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @linaro.org) X-ZM-MESSAGEID: 1696845901804100003 Follow all other tests pattern from this file, use the global 'cfg' variable to fix: tests/unit/test-throttle.c:621:20: error: declaration shadows a variable = in the global scope [-Werror,-Wshadow] ThrottleConfig cfg; ^ tests/unit/test-throttle.c:28:23: note: previous declaration is here static ThrottleConfig cfg; ^ Signed-off-by: Philippe Mathieu-Daud=C3=A9 Acked-by: Alberto Garcia --- tests/unit/test-throttle.c | 1 - 1 file changed, 1 deletion(-) diff --git a/tests/unit/test-throttle.c b/tests/unit/test-throttle.c index ac35d65d19..2146cfacd3 100644 --- a/tests/unit/test-throttle.c +++ b/tests/unit/test-throttle.c @@ -618,7 +618,6 @@ static bool do_test_accounting(bool is_ops, /* are we t= esting bps or ops */ { THROTTLE_OPS_TOTAL, THROTTLE_OPS_READ, THROTTLE_OPS_WRITE, } }; - ThrottleConfig cfg; BucketType index; int i; =20 --=20 2.41.0 From nobody Wed Nov 27 21:47:33 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; 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=pass(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1696846010; cv=none; d=zohomail.com; s=zohoarc; b=cuP4HnlPP+21wdIIVPDoi43cHeWq15IAa6JSpmJL/fEYlh2+9kjdiDIzEzg4z/MVojBl9uxg/MsxhqtCxfWmDSh9xyxOEEb4pAgqys2fTbJ273YOqNMUOLP85poTQRKPbY2K1y3gerraGg15yWfWMj1Wq3DVgdEmVsj+4zcwwzA= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1696846010; h=Content-Type:Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=CcautlB5vSVFo4vMCX8wZDEeLw5WS31TyE81+hqdwZU=; b=LRlatwbwM2ujGypuED6nm7+fl8Iuh0hdaii+cYy3DFc+k5bHmdMkvOb63BI6vx0ljQlReA4Uv6T4ObmEO6yFLLsdcEnyOMaOd6dalElKy1Kyp1AMHkH7lhpuPhrf7cGDV8V6RPXmm/NggWUXQJuC3VvX0VAd6jLNK+HFfLR5dQY= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; 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=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 169684601069191.36192774644974; Mon, 9 Oct 2023 03:06:50 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qpn73-0003SO-9L; Mon, 09 Oct 2023 06:03:45 -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 1qpn6h-0003A7-Mo for qemu-devel@nongnu.org; Mon, 09 Oct 2023 06:03:25 -0400 Received: from mail-wm1-x329.google.com ([2a00:1450:4864:20::329]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1qpn6Y-0000AO-SL for qemu-devel@nongnu.org; Mon, 09 Oct 2023 06:03:18 -0400 Received: by mail-wm1-x329.google.com with SMTP id 5b1f17b1804b1-40566f89f6eso43225225e9.3 for ; Mon, 09 Oct 2023 03:03:13 -0700 (PDT) Received: from m1x-phil.lan (thr44-h01-176-170-217-185.dsl.sta.abo.bbox.fr. [176.170.217.185]) by smtp.gmail.com with ESMTPSA id n16-20020a05600c3b9000b0040684abb623sm13067525wms.24.2023.10.09.03.03.10 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Mon, 09 Oct 2023 03:03:11 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1696845792; x=1697450592; 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=CcautlB5vSVFo4vMCX8wZDEeLw5WS31TyE81+hqdwZU=; b=LqiENubTzJbwxZmhmbciLJv3+8ZiwzmAevxrBHFuBtw9bQtm4bV8KQdaLtQpTaZwvP cI3kBPm6NRqHGc7t13QEv7WrZDYcsXDOYnvmW77HVHwVi8gpxwyy2T3i5rUcf9zvM8Za 9dGrpeA0enPcuDbMi+Yh44/bmyrQAuMvKnNDKJlapdWNatvVQjpoF/G1Y6Z6Zw9Q6gpz cgi7jK15DWKpeOQOA053Uv3FSMzFhd7q/UqKJASSMJvoPKMV3jX7dVhGX5mr5Hleq1qd VzNLpGeU8tJqMCvDyXw6WMKB6nZ9SBbhuYlxURI0dBoIa4zvhrg+NQNr4vlOMrUnqqi9 MbzQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1696845792; x=1697450592; 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=CcautlB5vSVFo4vMCX8wZDEeLw5WS31TyE81+hqdwZU=; b=QfDpylCBDGsA8/dc7eUzGVSrp6d8/iLnd46DTC5a7jnC92x2KP5Pf4i6/E/yuFHGt4 XxECR/3Ag44JFS5s7d1Z0m/cp2UUPaleZQZx52lDuzyH4eu11aYUeBweUwlvbZ5xLIM8 T10szT4Ojjhoo7vYE6Czkp8UIJBfH+fyK/H8GeF1W3cfsv/+M9R0+2UZ3HdONQd63ja2 nb5FDY6kbteiIGrzdvdtrTzxwJQ9MLzWbQvDs3qvJZmD+f8lWcZ3An9x0a9nfy8u4tzF eI1KyS4yvaa0e5D1bjdlhIvvMp5c2EWcivOUmxWLTf1TLnIcnd6YyMvqJCN1ROG3HdPH LDxQ== X-Gm-Message-State: AOJu0Yy8inhV4S05TZK8l52daR2Z2cGOuzp2roFZk+b3PeuAsDLAZdEH Nm9UIfjLRXTcpv54MHGURxJsEdR5EtOEOJ4AjnM= X-Google-Smtp-Source: AGHT+IECNxLaTShJTwYGhhlueGvaDGtPvWyJV+BbpMnax0WiFV0cp3rSzo95fjNM0tE0lAyPZPioqA== X-Received: by 2002:a05:600c:2191:b0:405:36a0:108f with SMTP id e17-20020a05600c219100b0040536a0108fmr14034470wme.41.1696845791966; Mon, 09 Oct 2023 03:03:11 -0700 (PDT) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: qemu-arm@nongnu.org, Alberto Garcia , Hao Wu , Kevin Wolf , Thomas Huth , Laurent Vivier , Paolo Bonzini , qemu-block@nongnu.org, John Snow , Stefan Hajnoczi , Fam Zheng , Tyrone Ting , Markus Armbruster , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= Subject: [PATCH 03/10] tests/virtio-scsi: Clean up global variable shadowing Date: Mon, 9 Oct 2023 12:02:44 +0200 Message-ID: <20231009100251.56019-4-philmd@linaro.org> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20231009100251.56019-1-philmd@linaro.org> References: <20231009100251.56019-1-philmd@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" 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=2a00:1450:4864:20::329; envelope-from=philmd@linaro.org; helo=mail-wm1-x329.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+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @linaro.org) X-ZM-MESSAGEID: 1696846012266100001 Rename the (unused) 'allow' argument, following the pattern used by the other tests in this file. This fixes: tests/qtest/virtio-scsi-test.c:159:61: error: declaration shadows a varia= ble in the global scope [-Werror,-Wshadow] static void hotplug(void *obj, void *data, QGuestAllocator *alloc) ^ tests/qtest/virtio-scsi-test.c:37:25: note: previous declaration is here static QGuestAllocator *alloc; ^ Signed-off-by: Philippe Mathieu-Daud=C3=A9 Reviewed-By: Emmanouil Pitsidianakis Reviewed-by: Thomas Huth --- tests/qtest/virtio-scsi-test.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/qtest/virtio-scsi-test.c b/tests/qtest/virtio-scsi-test.c index ceaa7f2415..db10d572d0 100644 --- a/tests/qtest/virtio-scsi-test.c +++ b/tests/qtest/virtio-scsi-test.c @@ -156,7 +156,7 @@ static QVirtioSCSIQueues *qvirtio_scsi_init(QVirtioDevi= ce *dev) return vs; } =20 -static void hotplug(void *obj, void *data, QGuestAllocator *alloc) +static void hotplug(void *obj, void *data, QGuestAllocator *t_alloc) { QTestState *qts =3D global_qtest; =20 --=20 2.41.0 From nobody Wed Nov 27 21:47:33 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; 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=pass(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1696846045; cv=none; d=zohomail.com; s=zohoarc; b=HFPsnQFz/q9eZvL5quKifolHYyvJ2bHSKZMFwb0lCyRdR5Wz3Dl1J1OBGIDeL+W3mwm9gU/TVaw0uJdr9xPbwDUhnvBqI2GmU0I/g4Gn0nFyk0LoqQr3F+K3zpgBT3N6tHL2ea0pkmKxavhPhfFdWMT/82fRBeXkg3Oqbt/DR4w= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1696846045; h=Content-Type:Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=41oTD6R/rEUywh5fXwmkk1fZnIoCcZZdSBr5PNChPlg=; b=ed82d6Lk7dbP3NVAQdHDMMMghW0nzY/mr0+uLM9MDxHi5moBq35ba2bcfwS1Ljk5wHzzj0fqAYkMBC7mtE6Qu9+nZsZn85vESG6FiDsLEYqMs8J9NJaV/YGhnWpz8A9uGzhSuNfPZZSl5AUsD2sXVdOkQDtCAhTM7ue8hvZ5ONM= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; 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=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1696846045460731.5484313271603; Mon, 9 Oct 2023 03:07:25 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qpn75-0003Xz-4l; Mon, 09 Oct 2023 06:03:47 -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 1qpn6l-0003CK-83 for qemu-devel@nongnu.org; Mon, 09 Oct 2023 06:03:30 -0400 Received: from mail-wm1-x32c.google.com ([2a00:1450:4864:20::32c]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1qpn6g-0000BJ-I9 for qemu-devel@nongnu.org; Mon, 09 Oct 2023 06:03:25 -0400 Received: by mail-wm1-x32c.google.com with SMTP id 5b1f17b1804b1-40572aeb673so41851495e9.0 for ; Mon, 09 Oct 2023 03:03:19 -0700 (PDT) Received: from m1x-phil.lan (thr44-h01-176-170-217-185.dsl.sta.abo.bbox.fr. [176.170.217.185]) by smtp.gmail.com with ESMTPSA id f15-20020a5d50cf000000b00323330edbc7sm9152973wrt.20.2023.10.09.03.03.16 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Mon, 09 Oct 2023 03:03:17 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1696845798; x=1697450598; 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=41oTD6R/rEUywh5fXwmkk1fZnIoCcZZdSBr5PNChPlg=; b=lTmCt5zVWvuSfREsyX5+5q3QyhFC/3EU8hv4Kt0Bj1EwsxjnJihBXjpgWxu8ZDnrrj 54lNAarh1aLyYBjb/xKhz07yv5v67ifaXr9rI4ngSw6ipUIlTGr7fcVSLTLJuuUmYqDH IYbZfO4eb8XY/g1EztLSx8gR4lm3WvFa4GVpYgxqZS/WiHfKYwWo1sycRI7zRtIYwPuY /74e7er2tSevzuPFG3hgUEVIbxOd6jhz1qE4GfOBA0kJUCwTPCk/V9kRPvFqi+Mdh1PX aJZlGkA9VxrxgXz7MxcC4sBZ/vop6F1G4lXa6WnxDOMOfzfOzJwz+CTw3fj2xRDbdBVi Vxwg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1696845798; x=1697450598; 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=41oTD6R/rEUywh5fXwmkk1fZnIoCcZZdSBr5PNChPlg=; b=CkNUYQYgR+pFQNK3Ek7WvRoiggGiC8Oc+0LF1bj2o6YB3Nxh8azF90hFli24Fzv75k WJUrzKuvKW21jXF4uyv5Z0UDjGDKzj0g2hUOR1D9m02GXaVsn0LOjQCx+uFI38SPoUYJ TKTbpAP46umdXjngpFgsi1pYBmaAGCCxLIma95ZoOSYBmh5AolGJbOvVOz58mxZs/8PV HAn4qxYP7W8oSLz3SUCZUC11N16Ru17u8tUn38swCmpbHxK1ngRQUk8eAYwNrqmEjcLt obuLB8KcZgCpHyNttwdtBUU4pQbmWbI34a7BZ5dO3AjvKe9eZB1MOL41ouDZPgoD4LzX RBLg== X-Gm-Message-State: AOJu0YzrH3wsxYH/fIxoIJ7XxsPdMuIRxBhrgbw9jPZjoPFZLJwGqX+s bsTGMecvkJC8iMc/GR6N0Ys4+/NQKOXw0OqUNe8= X-Google-Smtp-Source: AGHT+IHsFNNjsBvmkuF8QXHop8Si6ohVN723mIOptbt+kODQXuxjNBKT6Go7/bJcuCRwbboLsnbFSg== X-Received: by 2002:a5d:6a4c:0:b0:31f:8a6d:e527 with SMTP id t12-20020a5d6a4c000000b0031f8a6de527mr13848722wrw.45.1696845797855; Mon, 09 Oct 2023 03:03:17 -0700 (PDT) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: qemu-arm@nongnu.org, Alberto Garcia , Hao Wu , Kevin Wolf , Thomas Huth , Laurent Vivier , Paolo Bonzini , qemu-block@nongnu.org, John Snow , Stefan Hajnoczi , Fam Zheng , Tyrone Ting , Markus Armbruster , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= Subject: [PATCH 04/10] tests/cdrom-test: Clean up global variable shadowing in prepare_image() Date: Mon, 9 Oct 2023 12:02:45 +0200 Message-ID: <20231009100251.56019-5-philmd@linaro.org> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20231009100251.56019-1-philmd@linaro.org> References: <20231009100251.56019-1-philmd@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" 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=2a00:1450:4864:20::32c; envelope-from=philmd@linaro.org; helo=mail-wm1-x32c.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+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @linaro.org) X-ZM-MESSAGEID: 1696846046410100001 Rename the variable to fix: tests/qtest/cdrom-test.c:40:50: error: declaration shadows a variable in = the global scope [-Werror,-Wshadow] static int prepare_image(const char *arch, char *isoimage) ^ tests/qtest/cdrom-test.c:18:13: note: previous declaration is here static char isoimage[] =3D "cdrom-boot-iso-XXXXXX"; ^ Signed-off-by: Philippe Mathieu-Daud=C3=A9 Reviewed-by: John Snow --- tests/qtest/cdrom-test.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tests/qtest/cdrom-test.c b/tests/qtest/cdrom-test.c index f2a8d91929..0945383789 100644 --- a/tests/qtest/cdrom-test.c +++ b/tests/qtest/cdrom-test.c @@ -37,17 +37,17 @@ static int exec_xorrisofs(const char **args) return exit_status; } =20 -static int prepare_image(const char *arch, char *isoimage) +static int prepare_image(const char *arch, char *isoimagepath) { char srcdir[] =3D "cdrom-test-dir-XXXXXX"; char *codefile =3D NULL; int ifh, ret =3D -1; const char *args[] =3D { "xorrisofs", "-quiet", "-l", "-no-emul-boot", - "-b", NULL, "-o", isoimage, srcdir, NULL + "-b", NULL, "-o", isoimagepath, srcdir, NULL }; =20 - ifh =3D mkstemp(isoimage); + ifh =3D mkstemp(isoimagepath); if (ifh < 0) { perror("Error creating temporary iso image file"); return -1; --=20 2.41.0 From nobody Wed Nov 27 21:47:33 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; 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=pass(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1696845969; cv=none; d=zohomail.com; s=zohoarc; b=h1ZbKSXPTN5WCo0u17w+p/lUBDzf7a0bUEpN2T5guYn1H/JdHezHK4vCG2NOcm6JpH3YXVViuB2j4NE3AJ/z/Xj8j72RIBL9SA1p6OmvG4YJDOQfsxQ2VQOW1sr+yzTQY9XSAoBF0aQok962l+A164W9jSvL2AGcjT6MFK7olDo= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1696845969; h=Content-Type:Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=tV1dKtatvnpslv9IY1Ow2PCBM/jxT9Mvzt/XqDZ+aVE=; b=gGPxD1Lu7bqty2as11Ds+GN0LLLECK8ddJaYO0BVoR7iNRU7Avm28eE/X5bPaMg2lCpFXMEdMijOzvdLYe7ZeYnRZNWoCh9iYiFfAjwLDlRdSQz3K5RWFjiOWMeUrzF8KwkZKhGu4rGTf7kVUtW91RduAS95SYaulV36r6WbatA= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; 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=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1696845969365677.7949030828228; Mon, 9 Oct 2023 03:06:09 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qpn72-0003T7-QE; Mon, 09 Oct 2023 06:03:44 -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 1qpn6n-0003Cf-Al for qemu-devel@nongnu.org; Mon, 09 Oct 2023 06:03:31 -0400 Received: from mail-wr1-x436.google.com ([2a00:1450:4864:20::436]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1qpn6j-0000Cj-V0 for qemu-devel@nongnu.org; Mon, 09 Oct 2023 06:03:28 -0400 Received: by mail-wr1-x436.google.com with SMTP id ffacd0b85a97d-3231d67aff2so4340803f8f.0 for ; Mon, 09 Oct 2023 03:03:24 -0700 (PDT) Received: from m1x-phil.lan (thr44-h01-176-170-217-185.dsl.sta.abo.bbox.fr. [176.170.217.185]) by smtp.gmail.com with ESMTPSA id l1-20020a5d4bc1000000b00323287186b2sm9144677wrt.29.2023.10.09.03.03.22 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Mon, 09 Oct 2023 03:03:23 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1696845803; x=1697450603; 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=tV1dKtatvnpslv9IY1Ow2PCBM/jxT9Mvzt/XqDZ+aVE=; b=BizLTxfjQaUfC3b6v9gx+lRxs+TNsM9dcislbcXj4BkRrPlwRnZ/NXZStflqpgjef3 3LR1eFHdUGzIRDpbETPW1SjyFNZbRMYdj287jbVjN+NZf6tD+obu0sYAjRNqCBOyASAo uzq61kv5kcWmJdJC567JvvV3QuS7kcocaPAvWRNYF+oKr8uqYCJUrS7+Ar0K2i/SWoYi Hn+v3mZpzjAvBL6mx9dIJK/RZN0hxhxZqX28sCL6cL9ku72PSxRhYS5WnrjkG6qpsHYi jF9wYhdSqdrw5VGkc5rLnFHD1LsSw5F9fXfsqAQUgrL7lpFPve2rkW/hpnSyfp7II048 bBYA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1696845803; x=1697450603; 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=tV1dKtatvnpslv9IY1Ow2PCBM/jxT9Mvzt/XqDZ+aVE=; b=g2EnoVUqID7AVY30t3sNMJxWZYJZj+BpW48INoG6xC/OWnODJuBdYN6iDaaNq9bImw i9puxDdj70IvocPyL0sotNQ6f6LyJhhoL0CpJ/OgOpH6/PHGnVkbawa/w8fRSdGszq5q O6Sbn9LNRppOOdbZ3VTW1YM2xM3+ZX5R/5nED8/jhHV2rZzbI0Ah/kxPu7QIdIoqRvm2 9znrYpEpbhZ7/V4g06k6PZfezlbq1YFawnSo8Sg5S14sbKQE/Cbv2dseNohyGGLP8lGx qvXRU0k+jBZA2YOM2HCcPGGIG6+gGzZCV605vN1pygDYQSa0Ovg1TTgNfQbRWkq1o3TR RDzA== X-Gm-Message-State: AOJu0YwIpD74uMqZ5s5j8etVzqaM9+/W1tBDSbVpcpm4G9c1m4kLBPjB dC5kDfWxJ4BrcavWmRUmEY+QhPqOHUEyQaRSTlQ= X-Google-Smtp-Source: AGHT+IGGPZwRUmfq0aik9grg53A3iGCiS7xFvgeog0+qk6Vo78/tHl7sSfYNuWPRC4Hlret45wznjw== X-Received: by 2002:adf:dd8f:0:b0:313:f45f:74a1 with SMTP id x15-20020adfdd8f000000b00313f45f74a1mr13833134wrl.51.1696845803597; Mon, 09 Oct 2023 03:03:23 -0700 (PDT) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: qemu-arm@nongnu.org, Alberto Garcia , Hao Wu , Kevin Wolf , Thomas Huth , Laurent Vivier , Paolo Bonzini , qemu-block@nongnu.org, John Snow , Stefan Hajnoczi , Fam Zheng , Tyrone Ting , Markus Armbruster , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= Subject: [PATCH 05/10] tests/hd-geo-test: Clean up global variable shadowing Date: Mon, 9 Oct 2023 12:02:46 +0200 Message-ID: <20231009100251.56019-6-philmd@linaro.org> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20231009100251.56019-1-philmd@linaro.org> References: <20231009100251.56019-1-philmd@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" 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=2a00:1450:4864:20::436; envelope-from=philmd@linaro.org; helo=mail-wr1-x436.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+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @linaro.org) X-ZM-MESSAGEID: 1696845970130100001 Rename the variable to fix: tests/qtest/hd-geo-test.c:610:11: error: declaration shadows a variable i= n the global scope [-Werror,-Wshadow] char *img_file_name; ^ tests/qtest/hd-geo-test.c:80:14: note: previous declaration is here static char *img_file_name[backend_last]; ^ Signed-off-by: Philippe Mathieu-Daud=C3=A9 --- tests/qtest/hd-geo-test.c | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/tests/qtest/hd-geo-test.c b/tests/qtest/hd-geo-test.c index d08bffad91..e5e28c412d 100644 --- a/tests/qtest/hd-geo-test.c +++ b/tests/qtest/hd-geo-test.c @@ -78,6 +78,7 @@ static const CHST hd_chst[backend_last][mbr_last] =3D { }; =20 static char *img_file_name[backend_last]; +static char *qcow2_imgpath; =20 static const CHST *cur_ide[4]; =20 @@ -607,18 +608,17 @@ static TestArgs *create_args(void) static void add_drive_with_mbr(TestArgs *args, MBRpartitions mbr, uint64_t sectors) { - char *img_file_name; char part[300]; int ret; =20 g_assert(args->n_drives < MAX_DRIVES); =20 - img_file_name =3D create_qcow2_with_mbr(mbr, sectors); + qcow2_imgpath =3D create_qcow2_with_mbr(mbr, sectors); =20 - args->drives[args->n_drives] =3D img_file_name; + args->drives[args->n_drives] =3D qcow2_imgpath; ret =3D snprintf(part, sizeof(part), "-drive file=3D%s,if=3Dnone,format=3Dqcow2,id=3Ddisk%d", - img_file_name, args->n_drives); + qcow2_imgpath, args->n_drives); g_assert((0 < ret) && (ret <=3D sizeof(part))); args->argc =3D append_arg(args->argc, args->argv, ARGV_SIZE, g_strdup(= part)); args->n_drives++; @@ -1139,6 +1139,10 @@ test_add_done: g_free(img_file_name[i]); } } + if (qcow2_imgpath) { + unlink(qcow2_imgpath); + g_free(qcow2_imgpath); + } =20 return ret; } --=20 2.41.0 From nobody Wed Nov 27 21:47:33 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; 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=pass(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1696845895; cv=none; d=zohomail.com; s=zohoarc; b=IWOEa9wwKJp2TAQhpixBXKLXXmpzeyEF+JITyzhFPShLpIo3H3WdR6sfEfjwvAiGo0OokTRusO/gFXAV+eTixZqwl9kvLvMohJDxGGdZhXyKZGICYyfXvFmDXkSlIBg3mdg7kIq2dbydUmUtKgq/+x1En+6j/y08G1FPCJxQUm8= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1696845895; h=Content-Type:Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=vQJEL8vkJwny7eCI7iH0HAlqhSa/NiYKDVoeaT20KQc=; b=Jsc4PrsdQCD/OGp4gSJzpSK2N//1rrU/fJbXXQGkgx6zk8RKpFuOPsuX4omKLt3tPIQG/H+7kkYZWiMiQkYaJeYZSuc2QDwOy3QsHxkufhOp/UXiq0crrUD/t2uxJ2SkVezcRi8uRdwRRQQr1ThCF9dJou2QvOHd1Jv/bVaZPEA= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; 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=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1696845895163221.25071183964826; Mon, 9 Oct 2023 03:04:55 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qpn73-0003UL-KF; Mon, 09 Oct 2023 06:03:45 -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 1qpn6q-0003GO-Pa for qemu-devel@nongnu.org; Mon, 09 Oct 2023 06:03:33 -0400 Received: from mail-wm1-x336.google.com ([2a00:1450:4864:20::336]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1qpn6p-0000E1-8b for qemu-devel@nongnu.org; Mon, 09 Oct 2023 06:03:32 -0400 Received: by mail-wm1-x336.google.com with SMTP id 5b1f17b1804b1-40684f53bfcso39820975e9.0 for ; Mon, 09 Oct 2023 03:03:30 -0700 (PDT) Received: from m1x-phil.lan (thr44-h01-176-170-217-185.dsl.sta.abo.bbox.fr. [176.170.217.185]) by smtp.gmail.com with ESMTPSA id z7-20020a7bc7c7000000b003fee567235bsm13006999wmk.1.2023.10.09.03.03.27 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Mon, 09 Oct 2023 03:03:28 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1696845809; x=1697450609; 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=vQJEL8vkJwny7eCI7iH0HAlqhSa/NiYKDVoeaT20KQc=; b=xBt0Ufe8jh3S90b0I7EhTDz3tEtAQ2/ygTSZFL1Gbm67S6ZBlM9on06RuPrUicv00U wwBtMD9q+WEqiSY5lz2MsoLAoz9wJkMRiFWBSdko7geK31v8GQH7vCLhSSxlmDLP7lG1 1jlVeqkOq0SrqYTHdIzrUKHWAup579NRPUOgvv2bMgJ9px0fmDhsJ8+gyjTyUKeu7g4F Ja9+hfrL+3D17c+RxDHBhijnBCH5bEpOnq5FPr8F451S7JG8H0Cg4vKwq75WdajtDlM2 0spoxO/Ue6q50PKmG03EL8Fzy8y3uK6oss2X9fOj/JSn1yl2hjeiZbvAUDxR+6mEHlXW 1eGQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1696845809; x=1697450609; 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=vQJEL8vkJwny7eCI7iH0HAlqhSa/NiYKDVoeaT20KQc=; b=RW6aFVV9wmQCKNln6vCR05xJp9rmOHuU7jGcyCRnE588W56yJOxjEJT0YgwU/0SnId dd7n74pbDNTZrkQTZKlJyS8bT1AILctW8OtO5Hqq5wHuBr9TVBvRbIUfUpU8CCMi12SB 0wjE5sWwJg54tg0vHnYyFPLF1p1kzen5hSA3muFWvlrj8h24EdBNVQfT+KlasMcx0e86 lEIfq/RGL/+p1PIoZfe5PzJQEB/Q0xyyDbTiSzBMrCU1uXKStf5kYyR/5K9V633h7HO3 tYEPxELQIxkTJaF/8h9b6nFvL4VOwVx3JHryS2N3Rhh9CKpBfK9gBJaAOU+SDnj8mNtr 6F4w== X-Gm-Message-State: AOJu0Yxr6G9GeyMqIyJJKFFRUCl3bZUwQAJj1vV2dFWyhBYDLfwILv4d UNOTRF6QeWgNqn5FGCZLORMZJ7uHbnhXmqVNy4s= X-Google-Smtp-Source: AGHT+IHNOvoR1Sti2FB7P9xF8comWZ6qd+RcjY8T6fCSzeTWhOfetXtDc55MhflMYI4LXU1pcYow/w== X-Received: by 2002:a05:600c:1d8f:b0:407:3630:f35 with SMTP id p15-20020a05600c1d8f00b0040736300f35mr8285061wms.9.1696845809280; Mon, 09 Oct 2023 03:03:29 -0700 (PDT) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: qemu-arm@nongnu.org, Alberto Garcia , Hao Wu , Kevin Wolf , Thomas Huth , Laurent Vivier , Paolo Bonzini , qemu-block@nongnu.org, John Snow , Stefan Hajnoczi , Fam Zheng , Tyrone Ting , Markus Armbruster , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= Subject: [PATCH 06/10] tests/rtl8139: Clean up global variable shadowing Date: Mon, 9 Oct 2023 12:02:47 +0200 Message-ID: <20231009100251.56019-7-philmd@linaro.org> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20231009100251.56019-1-philmd@linaro.org> References: <20231009100251.56019-1-philmd@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" 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=2a00:1450:4864:20::336; envelope-from=philmd@linaro.org; helo=mail-wm1-x336.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=unavailable 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+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @linaro.org) X-ZM-MESSAGEID: 1696845895823100003 Rename the variable to fix: tests/qtest/rtl8139-test.c:28:33: error: declaration shadows a variable i= n the global scope [-Werror,-Wshadow] static void save_fn(QPCIDevice *dev, int devfn, void *data) ^ tests/qtest/rtl8139-test.c:37:17: error: declaration shadows a variable i= n the global scope [-Werror,-Wshadow] QPCIDevice *dev; ^ tests/qtest/rtl8139-test.c:25:20: note: previous declaration is here static QPCIDevice *dev; ^ Signed-off-by: Philippe Mathieu-Daud=C3=A9 Reviewed-by: Thomas Huth --- tests/qtest/rtl8139-test.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/tests/qtest/rtl8139-test.c b/tests/qtest/rtl8139-test.c index 4dc0a0d22e..eedf90f65a 100644 --- a/tests/qtest/rtl8139-test.c +++ b/tests/qtest/rtl8139-test.c @@ -22,7 +22,7 @@ static void nop(void) #define CLK 33333333 =20 static QPCIBus *pcibus; -static QPCIDevice *dev; +static QPCIDevice *pcidev; static QPCIBar dev_bar; =20 static void save_fn(QPCIDevice *dev, int devfn, void *data) @@ -46,7 +46,7 @@ static QPCIDevice *get_device(void) #define PORT(name, len, val) \ static unsigned __attribute__((unused)) in_##name(void) \ { \ - unsigned res =3D qpci_io_read##len(dev, dev_bar, (val)); \ + unsigned res =3D qpci_io_read##len(pcidev, dev_bar, (val)); \ if (verbosity_level >=3D 2) { \ g_test_message("*%s -> %x", #name, res); \ } \ @@ -57,7 +57,7 @@ static void out_##name(unsigned v) \ if (verbosity_level >=3D 2) { \ g_test_message("%x -> *%s", v, #name); \ } \ - qpci_io_write##len(dev, dev_bar, (val), v); \ + qpci_io_write##len(pcidev, dev_bar, (val), v); \ } =20 PORT(Timer, l, 0x48) @@ -189,11 +189,11 @@ static void test_init(void) { uint64_t barsize; =20 - dev =3D get_device(); + pcidev =3D get_device(); =20 - dev_bar =3D qpci_iomap(dev, 0, &barsize); + dev_bar =3D qpci_iomap(pcidev, 0, &barsize); =20 - qpci_device_enable(dev); + qpci_device_enable(pcidev); =20 test_timer(); } --=20 2.41.0 From nobody Wed Nov 27 21:47:33 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; 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=pass(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1696846022; cv=none; d=zohomail.com; s=zohoarc; b=V5G8rxkwEk9T1XkMlCbeQxknkA+Rsgynz6rmHQabL54rjmX92bpBq4lRjkE5L0LMMH6M2atny0SjZ1RYzVvcpAy+cp2zAHqoAmsJ6MrIZPBI9ps6fztyq4GXUuaMeJ6Pk8v/azVTe018WVm4cc+e1H2WqD3sztaC86KZXzd2mwY= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1696846022; h=Content-Type:Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=Csk84OALb8Q47k8SHL9RxynHS9qNYD6xloMNS+mez1Q=; b=YK6ss0uOGOR3rYwMOJB1e3ILcLzaL+fT2Q91RGH1q3s/jpUnrinp7oSVa+SwygJxP/943CQF657/deZgDNtgzrLHdvBFr9fpJlchS7z34OvcbBU5UXdb6S/oUyDQrQMT3OPQLIsL/YaIXTCZKzuZQihJCqTi/auknntV8Q/h2xk= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; 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=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1696846022170678.0375702003818; Mon, 9 Oct 2023 03:07:02 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qpn74-0003Vx-G4; Mon, 09 Oct 2023 06:03:46 -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 1qpn70-0003P4-Jp for qemu-devel@nongnu.org; Mon, 09 Oct 2023 06:03:43 -0400 Received: from mail-wm1-x32d.google.com ([2a00:1450:4864:20::32d]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1qpn6v-0000F0-9k for qemu-devel@nongnu.org; Mon, 09 Oct 2023 06:03:41 -0400 Received: by mail-wm1-x32d.google.com with SMTP id 5b1f17b1804b1-40684f53bfcso39821925e9.0 for ; Mon, 09 Oct 2023 03:03:36 -0700 (PDT) Received: from m1x-phil.lan (thr44-h01-176-170-217-185.dsl.sta.abo.bbox.fr. [176.170.217.185]) by smtp.gmail.com with ESMTPSA id n10-20020a5d4c4a000000b00323287186aasm9142230wrt.32.2023.10.09.03.03.33 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Mon, 09 Oct 2023 03:03:34 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1696845815; x=1697450615; 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=Csk84OALb8Q47k8SHL9RxynHS9qNYD6xloMNS+mez1Q=; b=zN6Cr1B4PBnB8FvTSS1rtyEe2t/72GT18eWWuem3OErfj9/xw+WoDeuGwOHyOOexgx /y+xIz8SpZV9AuUb+O+OKyllmz1QyI/2oAaOVcSxugFr2ev+Jb1lS2NP6IP1VDv8V4GF EsbrctDLssFhxNDmCiG+lzkoR2yeAzZqLyqoLWF2EiPnci8GjpWJLLmTneW7J9/D70No o9AURB2MmcJ1Yirx9a32evQCLpWxpZfz+uCtAhi2uU2yh9JXz2JZeaVpSCrqOtUVF2eO 8v/74vb0fVO65GP0p0EcWhpniCMFC1gPWqH+7JHxCZgIBtBzSswNG3NEYxaLqO7Vsq0U nmsw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1696845815; x=1697450615; 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=Csk84OALb8Q47k8SHL9RxynHS9qNYD6xloMNS+mez1Q=; b=Uus9iHdavPpZei+obSbBKzxX+7f+1hBTwIg+yUTEoHuuig2XhrRuTmA0VGqBHYzdAN N9VbfRIGSTn8HTzBbVOhYfVP2GVggrRJXsMiHQ700+1+TTKF3sfacpr29k+v552GxdAZ PrNZsOd+9rtIw9zykjUt99AQH3BEzvgLifaHs3eTHPzlEqPtRVepyoC3opkSaEEj8cZ+ 7piBcWc0qYuCFmcXabNGhpnKyY02EoolUwdINGPQ4iOwBseszcfrYj6iD21XKYlPYAAF 0mXqpTyPMSehe0dqlRtQQsLL3EbOh7eChyF0+jrJwnLT2mHbW5WT/Mvm5SbjbTx1xP0c ONRw== X-Gm-Message-State: AOJu0YzMtZiojqdZ9+mDzdF6wz6qhcYJgLSTo7+zIRSSskWIhay5x8BE 51fl6sLl85JNDwvD3NHoAgIlyX7KAdABk/CebG8= X-Google-Smtp-Source: AGHT+IE5G/wk7T/I/eVYvZehGYGbz6kLhTjEtW25Bn6+z38D0ZNSRefxCdlZyvFHmxJ4TEyihaYP4Q== X-Received: by 2002:a05:6000:186c:b0:321:6779:944d with SMTP id d12-20020a056000186c00b003216779944dmr19359600wri.47.1696845815218; Mon, 09 Oct 2023 03:03:35 -0700 (PDT) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: qemu-arm@nongnu.org, Alberto Garcia , Hao Wu , Kevin Wolf , Thomas Huth , Laurent Vivier , Paolo Bonzini , qemu-block@nongnu.org, John Snow , Stefan Hajnoczi , Fam Zheng , Tyrone Ting , Markus Armbruster , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= Subject: [PATCH 07/10] tests/npcm7xx_adc: Clean up global variable shadowing Date: Mon, 9 Oct 2023 12:02:48 +0200 Message-ID: <20231009100251.56019-8-philmd@linaro.org> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20231009100251.56019-1-philmd@linaro.org> References: <20231009100251.56019-1-philmd@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" 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=2a00:1450:4864:20::32d; envelope-from=philmd@linaro.org; helo=mail-wm1-x32d.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=unavailable 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+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @linaro.org) X-ZM-MESSAGEID: 1696846024329100003 Rename the global 'adc' variable in order to avoid: tests/qtest/npcm7xx_adc-test.c:98:58: error: declaration shadows a variab= le in the global scope [-Werror,-Wshadow] static uint32_t adc_read_con(QTestState *qts, const ADC *adc) ^ tests/qtest/npcm7xx_adc-test.c:103:55: error: declaration shadows a varia= ble in the global scope [-Werror,-Wshadow] static void adc_write_con(QTestState *qts, const ADC *adc, uint32_t value) ^ tests/qtest/npcm7xx_adc-test.c:108:59: error: declaration shadows a varia= ble in the global scope [-Werror,-Wshadow] static uint32_t adc_read_data(QTestState *qts, const ADC *adc) ^ tests/qtest/npcm7xx_adc-test.c:119:53: error: declaration shadows a varia= ble in the global scope [-Werror,-Wshadow] static void adc_qom_set(QTestState *qts, const ADC *adc, ^ tests/qtest/npcm7xx_adc-test.c:135:57: error: declaration shadows a varia= ble in the global scope [-Werror,-Wshadow] static void adc_write_input(QTestState *qts, const ADC *adc, ^ tests/qtest/npcm7xx_adc-test.c:144:56: error: declaration shadows a varia= ble in the global scope [-Werror,-Wshadow] static void adc_write_vref(QTestState *qts, const ADC *adc, uint32_t valu= e) ^ tests/qtest/npcm7xx_adc-test.c:162:59: error: declaration shadows a varia= ble in the global scope [-Werror,-Wshadow] static uint32_t adc_prescaler(QTestState *qts, const ADC *adc) ^ tests/qtest/npcm7xx_adc-test.c:175:64: error: declaration shadows a varia= ble in the global scope [-Werror,-Wshadow] static void adc_wait_conv_finished(QTestState *qts, const ADC *adc, ^ tests/qtest/npcm7xx_adc-test.c:196:16: error: declaration shadows a varia= ble in the global scope [-Werror,-Wshadow] const ADC *adc =3D adc_p; ^ tests/qtest/npcm7xx_adc-test.c:207:16: error: declaration shadows a varia= ble in the global scope [-Werror,-Wshadow] const ADC *adc =3D adc_p; ^ tests/qtest/npcm7xx_adc-test.c:235:16: error: declaration shadows a varia= ble in the global scope [-Werror,-Wshadow] const ADC *adc =3D adc_p; ^ tests/qtest/npcm7xx_adc-test.c:267:16: error: declaration shadows a varia= ble in the global scope [-Werror,-Wshadow] const ADC *adc =3D adc_p; ^ tests/qtest/npcm7xx_adc-test.c:293:16: error: declaration shadows a varia= ble in the global scope [-Werror,-Wshadow] const ADC *adc =3D adc_p; ^ tests/qtest/npcm7xx_adc-test.c:311:16: error: declaration shadows a varia= ble in the global scope [-Werror,-Wshadow] const ADC *adc =3D adc_p; ^ tests/qtest/npcm7xx_adc-test.c:93:5: note: previous declaration is here ADC adc =3D { ^ Signed-off-by: Philippe Mathieu-Daud=C3=A9 Reviewed-by: Thomas Huth --- tests/qtest/npcm7xx_adc-test.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/tests/qtest/npcm7xx_adc-test.c b/tests/qtest/npcm7xx_adc-test.c index 8048044d28..e751a72e36 100644 --- a/tests/qtest/npcm7xx_adc-test.c +++ b/tests/qtest/npcm7xx_adc-test.c @@ -90,7 +90,7 @@ typedef struct ADC { uint64_t base_addr; } ADC; =20 -ADC adc =3D { +ADC adc_defs =3D { .irq =3D 0, .base_addr =3D 0xf000c000 }; @@ -367,12 +367,12 @@ int main(int argc, char **argv) { g_test_init(&argc, &argv, NULL); =20 - add_test(init, &adc); - add_test(convert_internal, &adc); - add_test(convert_external, &adc); - add_test(interrupt, &adc); - add_test(reset, &adc); - add_test(calibrate, &adc); + add_test(init, &adc_defs); + add_test(convert_internal, &adc_defs); + add_test(convert_external, &adc_defs); + add_test(interrupt, &adc_defs); + add_test(reset, &adc_defs); + add_test(calibrate, &adc_defs); =20 return g_test_run(); } --=20 2.41.0 From nobody Wed Nov 27 21:47:33 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; 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=pass(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1696845936; cv=none; d=zohomail.com; s=zohoarc; b=dcK5hsjjZlRE4sJrmZReu+eA5ckT0+YEZU46ql8z4Uvtzy3WqjITQUzfkjsRhxKNmH+HVA8kHP4437ghTi5ZRqQOpZFUpBgkYCvLs95aDsu7ALnWLpsMLc0zueY7Yi03qbx7AsFmKEFDPBcuEwnFqzwttgofoBYZ8NDVc/1B484= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1696845936; h=Content-Type:Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=iSzCHIdmj0ACDSZfJdt/n9uVk8fHj/Z/ypjnOvyiyyQ=; b=DFFkAOfMsMHGOQimAmfHYhuTYNll7x4M6qV5UGS2gZGvSYZirFDVgNApR8qfr08E1V4ayQWCKXIoa4hF+cJ4VXnOyAzzBv2/M6sn3Ln/FHH7IZr8J3B8KbCEBTrmSoEzcjFcUoiwZ2MOTcyHgU/jUE6NvvJhD4y50dzLpwd4TgQ= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; 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=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1696845936059724.8907607662625; Mon, 9 Oct 2023 03:05:36 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qpn7G-0003yC-31; Mon, 09 Oct 2023 06:03:58 -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 1qpn7D-0003oS-TS for qemu-devel@nongnu.org; Mon, 09 Oct 2023 06:03:55 -0400 Received: from mail-wr1-x429.google.com ([2a00:1450:4864:20::429]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1qpn71-0000HJ-Sh for qemu-devel@nongnu.org; Mon, 09 Oct 2023 06:03:55 -0400 Received: by mail-wr1-x429.google.com with SMTP id ffacd0b85a97d-32157c8e4c7so4323708f8f.1 for ; Mon, 09 Oct 2023 03:03:43 -0700 (PDT) Received: from m1x-phil.lan (thr44-h01-176-170-217-185.dsl.sta.abo.bbox.fr. [176.170.217.185]) by smtp.gmail.com with ESMTPSA id a11-20020adff7cb000000b00326f0ca3566sm9100072wrq.50.2023.10.09.03.03.39 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Mon, 09 Oct 2023 03:03:40 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1696845821; x=1697450621; 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=iSzCHIdmj0ACDSZfJdt/n9uVk8fHj/Z/ypjnOvyiyyQ=; b=VsSpVz3qWINYyFrX77Fht7WUw7EvnZhqvO1AWsKHj+npp/+nYRu33J9Ezl6w9RS18X Mcy1gJY5+J82CrV72YFFBltIZ4QR+F5CR8/LR9pc8To5efN4pIFRGGKG7sU9tiwe3E6p OjoKTDHvOjKxlefmec8u672hBLwTe+8C4rIYga72LqJ4TSreDITNR/IKnInNqlvEk4h1 T7Y0pLdyvD+4+3w48Eg/NiHN+uH+TEE1yG8r5q7gNpmLBYIKptA+W8g15bknEysL+Jvt A1Gr02BoiA54lWWiuhknD3l54xhFf6gc166QY6okWVH7jmbo9fRJEXjwpd1IWNeKshYW YIlA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1696845821; x=1697450621; 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=iSzCHIdmj0ACDSZfJdt/n9uVk8fHj/Z/ypjnOvyiyyQ=; b=nSnqqm0hf8Q7nBO5x4GB5hSF+w5zXQzB4qLa0Z4JIWFwjzg++tQVMFjk5k65h6RpXx xGLQplkef9ToiDDor1IXQ0PhXbsOg1U1U02HwMJeMZKMXwRa/8knr0lDjX4eFYWatFME DcZWJJ0l1ZimqCHbG6G3Fu7ROjcQshbYVmWKaa1c0hjbt8g/AwZsKe+VJSmGG6v6rYW9 +gx//6Tmnb4tFye+OzSutaBYMU8yGEGDubesdGl+Lxal30Ki0J9fquH6DdXGtJnj9soy ddNfAoT4s1khRzort/qDY6FLcq3jjsEQBVjJ0gs7KhK2Xt/wdzNNC8Fkp9BTfGM6Nvg3 f69g== X-Gm-Message-State: AOJu0YzjkFlyp5f/Mi+8fXKP3XH83Lbu4BUk7eLGuX2Zv5kSkfv7emQR HJSdc0WQPwL2EZG6pWiIsAXuebyaUVnzNsXnWZA= X-Google-Smtp-Source: AGHT+IFB2nZB4K5M74QyfHCyq/txcHsLN0nGY1Qm5cF9Q436pg4ZOBegdF0q5DQUFpMzF4ckLHSPmA== X-Received: by 2002:adf:cc81:0:b0:321:5971:23a5 with SMTP id p1-20020adfcc81000000b00321597123a5mr13194274wrj.20.1696845821011; Mon, 09 Oct 2023 03:03:41 -0700 (PDT) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: qemu-arm@nongnu.org, Alberto Garcia , Hao Wu , Kevin Wolf , Thomas Huth , Laurent Vivier , Paolo Bonzini , qemu-block@nongnu.org, John Snow , Stefan Hajnoczi , Fam Zheng , Tyrone Ting , Markus Armbruster , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= Subject: [PATCH 08/10] tests/aio: Clean up global variable shadowing Date: Mon, 9 Oct 2023 12:02:49 +0200 Message-ID: <20231009100251.56019-9-philmd@linaro.org> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20231009100251.56019-1-philmd@linaro.org> References: <20231009100251.56019-1-philmd@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" 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=2a00:1450:4864:20::429; envelope-from=philmd@linaro.org; helo=mail-wr1-x429.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, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=unavailable 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+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @linaro.org) X-ZM-MESSAGEID: 1696845937972100002 Rename the argument to fix: tests/unit/test-aio.c:130:44: error: declaration shadows a variable in th= e global scope [-Werror,-Wshadow] static void set_event_notifier(AioContext *ctx, EventNotifier *notifier, ^ tests/unit/test-aio.c:22:20: note: previous declaration is here static AioContext *ctx; ^ Signed-off-by: Philippe Mathieu-Daud=C3=A9 Reviewed-by: Thomas Huth --- tests/unit/test-aio.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/unit/test-aio.c b/tests/unit/test-aio.c index 71ed31a4db..337b6e4ea7 100644 --- a/tests/unit/test-aio.c +++ b/tests/unit/test-aio.c @@ -127,10 +127,10 @@ static void *test_acquire_thread(void *opaque) return NULL; } =20 -static void set_event_notifier(AioContext *ctx, EventNotifier *notifier, +static void set_event_notifier(AioContext *nctx, EventNotifier *notifier, EventNotifierHandler *handler) { - aio_set_event_notifier(ctx, notifier, handler, NULL, NULL); + aio_set_event_notifier(nctx, notifier, handler, NULL, NULL); } =20 static void dummy_notifier_read(EventNotifier *n) --=20 2.41.0 From nobody Wed Nov 27 21:47:33 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; 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=pass(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1696845868; cv=none; d=zohomail.com; s=zohoarc; b=bPCSdCkcX/CoLzZHsTK11IcIQnYhVXVyxpoaqwUeFET8QFJmZn8+iANcV2ZM/p24k84yMFK65hUTQg53qtFqnqNcdzEWqQG3GvE4aZiMHhYTT8U2PqMAtqGA7uAek3qRgrXJS/vsw3DySxuutaiE/4qbOMgCIrWw6iIjCfhCbOg= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1696845868; h=Content-Type:Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=j5BNGs+G3EOO05KikjnRTYDtKwetCUKmXOLb4daofrU=; b=AZor1y4bTwxkzjKnC0TCq3XIR9Zg2CdKoa+pRJt0aUK91trEDmdxxjoDkRQgfoYizir8W98NK7vYRYv9lbTaetNHIMdQDlqlDTA8tl2phJ/xSzkNQE5A1Rv0LvDTlGaiViQUM9GhuXMyWoOKDYi5S6xDCPBDhcHBLtivD9pzRY8= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; 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=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1696845868764328.8525212055382; Mon, 9 Oct 2023 03:04:28 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qpn7E-0003rF-8L; Mon, 09 Oct 2023 06:03:56 -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 1qpn7C-0003nQ-H6 for qemu-devel@nongnu.org; Mon, 09 Oct 2023 06:03:54 -0400 Received: from mail-wr1-x42f.google.com ([2a00:1450:4864:20::42f]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1qpn77-0000I4-LU for qemu-devel@nongnu.org; Mon, 09 Oct 2023 06:03:54 -0400 Received: by mail-wr1-x42f.google.com with SMTP id ffacd0b85a97d-323ef9a8b59so4140096f8f.3 for ; Mon, 09 Oct 2023 03:03:48 -0700 (PDT) Received: from m1x-phil.lan (thr44-h01-176-170-217-185.dsl.sta.abo.bbox.fr. [176.170.217.185]) by smtp.gmail.com with ESMTPSA id z3-20020adfec83000000b0032327b70ef6sm9238656wrn.70.2023.10.09.03.03.45 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Mon, 09 Oct 2023 03:03:46 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1696845827; x=1697450627; 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=j5BNGs+G3EOO05KikjnRTYDtKwetCUKmXOLb4daofrU=; b=qfbbI8yY8NqDqpTFU+Q0fKIRBefTR95t+xv8lSMJNuXM5bOZLA/wKOQgh1SutgezcJ ZQehS0at/51Tsq0c3w5NdIc7wgTqcwv98meR9oBYUGmTXfNy5tYMZDHI96d8MyjJMzD+ NmYfEoyPea9/Hcgfz90JIyirbMgnv9cDwswcIxiui3rfGMAyzJtr9R6StzrB6GhiT42V M53BmAeLf16KmoXUVFXt+aCy34XUzfIO5lJor9sa9DOE2ZLDceUPySlfhYO+zNmQrMVl HsDq0PW7Si/l8LZusI1Xb3eQ6gtPlBKWQvoeLNG/VVdjQWSsLKAyLTtiRN8DSNzV7Ibz bSSg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1696845827; x=1697450627; 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=j5BNGs+G3EOO05KikjnRTYDtKwetCUKmXOLb4daofrU=; b=EPI1q9gFDZrWiv1TTzaDXgYF5RPXtnoHxy8kEFnGzoGVKn22gT2kirrq+qZVlKg20f Op1SYhfxmm5NMdpi9sBvkK56jCGJHbtUPbVKzse25vjh8pDQcDyvBVi4PVClhpuqsz4i VFlM5apLAEecY/Tkh8b8tQXe7BKnR5nkS8Mf6nyvaha7dG8H/J09OF7kk0XpN8JsiIVJ yw2M8kX3eUMmV/QD05XqG9GWFr6zEbp9pRGx3nowFPhi0n9oFQAJGYeDsQtCqq2/pQUv 3jy5Ev0hNKxLnyreo5UwCyVXOoF0OEvvNM1KyAtCVVuWP7wsZAfr651tKX8m3mFpyeSL /m3w== X-Gm-Message-State: AOJu0YwLpfhQeNA+IG0wE8G9rbWRIuTBdYdFEFx1vaNry221AHAo0VSF lg5wXkSL7taS+0n2C34fKevdvxj78edafdPK09M= X-Google-Smtp-Source: AGHT+IE9YxLEt/muh86Gc/XBMo0gh/LWmufACvCNy3aaAS8ORrFjEU9a/xwBtwxGUPG8lCCYEZfjAw== X-Received: by 2002:a05:6000:186c:b0:321:6779:944d with SMTP id d12-20020a056000186c00b003216779944dmr19360377wri.47.1696845826765; Mon, 09 Oct 2023 03:03:46 -0700 (PDT) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: qemu-arm@nongnu.org, Alberto Garcia , Hao Wu , Kevin Wolf , Thomas Huth , Laurent Vivier , Paolo Bonzini , qemu-block@nongnu.org, John Snow , Stefan Hajnoczi , Fam Zheng , Tyrone Ting , Markus Armbruster , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= Subject: [PATCH 09/10] tests/aio-multithread: Clean up global variable shadowing Date: Mon, 9 Oct 2023 12:02:50 +0200 Message-ID: <20231009100251.56019-10-philmd@linaro.org> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20231009100251.56019-1-philmd@linaro.org> References: <20231009100251.56019-1-philmd@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" 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=2a00:1450:4864:20::42f; envelope-from=philmd@linaro.org; helo=mail-wr1-x42f.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=unavailable 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+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @linaro.org) X-ZM-MESSAGEID: 1696845869679100003 Rename the argument to avoid: tests/unit/test-aio-multithread.c:226:37: error: declaration shadows a va= riable in the global scope [-Werror,-Wshadow] static void test_multi_co_mutex(int threads, int seconds) ^ tests/unit/test-aio-multithread.c:401:34: error: declaration shadows a va= riable in the global scope [-Werror,-Wshadow] static void test_multi_mutex(int threads, int seconds) ^ tests/unit/test-aio-multithread.c:24:18: note: previous declaration is he= re static IOThread *threads[NUM_CONTEXTS]; ^ Signed-off-by: Philippe Mathieu-Daud=C3=A9 --- tests/unit/test-aio-multithread.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/tests/unit/test-aio-multithread.c b/tests/unit/test-aio-multit= hread.c index 08d4570ccb..d587f20667 100644 --- a/tests/unit/test-aio-multithread.c +++ b/tests/unit/test-aio-multithread.c @@ -223,7 +223,7 @@ static void coroutine_fn test_multi_co_mutex_entry(void= *opaque) qatomic_dec(&running); } =20 -static void test_multi_co_mutex(int threads, int seconds) +static void test_multi_co_mutex(unsigned ctx_num, int seconds) { int i; =20 @@ -233,9 +233,9 @@ static void test_multi_co_mutex(int threads, int second= s) now_stopping =3D false; =20 create_aio_contexts(); - assert(threads <=3D NUM_CONTEXTS); - running =3D threads; - for (i =3D 0; i < threads; i++) { + assert(ctx_num <=3D NUM_CONTEXTS); + running =3D ctx_num; + for (i =3D 0; i < ctx_num; i++) { Coroutine *co1 =3D qemu_coroutine_create(test_multi_co_mutex_entry= , NULL); aio_co_schedule(ctx[i], co1); } @@ -398,7 +398,7 @@ static void test_multi_mutex_entry(void *opaque) qatomic_dec(&running); } =20 -static void test_multi_mutex(int threads, int seconds) +static void test_multi_mutex(unsigned ctx_num, int seconds) { int i; =20 @@ -408,9 +408,9 @@ static void test_multi_mutex(int threads, int seconds) now_stopping =3D false; =20 create_aio_contexts(); - assert(threads <=3D NUM_CONTEXTS); - running =3D threads; - for (i =3D 0; i < threads; i++) { + assert(ctx_num <=3D NUM_CONTEXTS); + running =3D ctx_num; + for (i =3D 0; i < ctx_num; i++) { Coroutine *co1 =3D qemu_coroutine_create(test_multi_mutex_entry, N= ULL); aio_co_schedule(ctx[i], co1); } --=20 2.41.0 From nobody Wed Nov 27 21:47:33 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; 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=pass(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1696845895; cv=none; d=zohomail.com; s=zohoarc; b=f8B0QzfB69KqBXZVbdDpJ9s4O8HyH1iwNeAS9JJnJ1sO0H3bstlRGtS7Y+mR8tWeWWpekJROKGDzguBR33hNjHlM9QEIZ7fEwdDbUCd2lm4Ab0/7+5WVFiPHtdAXtmKFJw2T8vWTknF8gaYJ+oCCpL/XtCaeFNFIBIOu09+mtuo= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1696845895; h=Content-Type:Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=yM3tQ6WCStP5GxgcqqxDxvp5O7sg3JFTcxjMkWzVHZg=; b=Zdl5JF2cnK8e6uHnhwE/oChqEQYqPa5BthlVN+UxtRcpDkhKgdvwMZWQYOse8p6WTcGOPDYJbpNI5CXJEpzhBoVBfOtkPSenHwZTKQ90sMPCm1+IToANWqlHrK4A4i63+cmDqtSnGoFpwLSwoquAgidEWludGekQPIfAtxTR6+U= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; 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=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1696845895823152.4616674101103; Mon, 9 Oct 2023 03:04:55 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qpn7G-00040F-QV; Mon, 09 Oct 2023 06:03:58 -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 1qpn7F-0003uB-2F for qemu-devel@nongnu.org; Mon, 09 Oct 2023 06:03:57 -0400 Received: from mail-wr1-x42f.google.com ([2a00:1450:4864:20::42f]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1qpn7C-0000Im-4Z for qemu-devel@nongnu.org; Mon, 09 Oct 2023 06:03:56 -0400 Received: by mail-wr1-x42f.google.com with SMTP id ffacd0b85a97d-327be5fe4beso3952376f8f.3 for ; Mon, 09 Oct 2023 03:03:53 -0700 (PDT) Received: from m1x-phil.lan (thr44-h01-176-170-217-185.dsl.sta.abo.bbox.fr. [176.170.217.185]) by smtp.gmail.com with ESMTPSA id b5-20020a056000054500b00326dd5486dcsm9172575wrf.107.2023.10.09.03.03.51 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Mon, 09 Oct 2023 03:03:52 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1696845832; x=1697450632; 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=yM3tQ6WCStP5GxgcqqxDxvp5O7sg3JFTcxjMkWzVHZg=; b=G4U1KfQCJyhWiPQBVyEuh7xX0UYNW+SmaGsAIL4ks0WZNNFKV4umm9c+USn5nsmT25 npSi1o0RR89dLmUBVd8l4b9DCS5tRshEnEGWNuXHIh/ajgkI7qEtpRb9ujHyeo4fZ0ef mfCQE1eUt7169TM8rYYKtgF3JZkYfK0xUGwC9KMzgc6kYkrwz4tVfB4iaWjKM3w8qHPn zvuBefJ9hN1SoA6LmNZ0ifAAHo8ZiYxcS72OlWyZuib4kNbUGOifiXYoBGudKsAebYnu kASbaKC/MOmL95yAMx8X302Mm1+UAIMFskXqQlKfvZWTrmDrIhJR9L+saJ/S/NXxh/oL ostw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1696845832; x=1697450632; 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=yM3tQ6WCStP5GxgcqqxDxvp5O7sg3JFTcxjMkWzVHZg=; b=JZndEEAb6Nlf+3PBpufMKFFCJ1F3T+uEaa2G5bLGDjt5kh4ULlU7T289y5iaY+cdNi maIDO3L8GZXezvCW+IWPqOcvP3xpIzrH5go8OzaFI5unozALdNNrmb1LpRa/0l+KJPPi s/TVf3IFFvlx5qS9W1x3M9WJgoTUKp52xtOmQ5C67SRfs/p/olDkOLzPCNe/j3VyGo7H CZnAzprQ253FzlSuf8GUSWtnTn69t6qpil6MmFY7Y5GTcH5SlN9ecDOai6dzx3bLI088 hrrRfDUjJIsBtBDldrlGSFmCRGFwpfHJT9uW9gElQgst8j7dbFI+TZwL6IuZIDoc3ac9 NcqQ== X-Gm-Message-State: AOJu0YyDF87WI5R4vTmL60JCMTWDASvoSrclr764/8kiLjB1BSd+gu4a Ei4xswATOLNKyS6Ds0cIDYk3un+zg+R2TLDTah4= X-Google-Smtp-Source: AGHT+IF65qL4ZzIe5cmY4tQWwVR6r7XKPdAwA10ajUQ6cq890S3wLuV3NsCVlAQzzxqO9LnOEeb5WQ== X-Received: by 2002:adf:e9d0:0:b0:31f:f432:b541 with SMTP id l16-20020adfe9d0000000b0031ff432b541mr13007184wrn.69.1696845832575; Mon, 09 Oct 2023 03:03:52 -0700 (PDT) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: qemu-arm@nongnu.org, Alberto Garcia , Hao Wu , Kevin Wolf , Thomas Huth , Laurent Vivier , Paolo Bonzini , qemu-block@nongnu.org, John Snow , Stefan Hajnoczi , Fam Zheng , Tyrone Ting , Markus Armbruster , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= Subject: [PATCH 10/10] tests/coroutine: Clean up global variable shadowing Date: Mon, 9 Oct 2023 12:02:51 +0200 Message-ID: <20231009100251.56019-11-philmd@linaro.org> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20231009100251.56019-1-philmd@linaro.org> References: <20231009100251.56019-1-philmd@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" 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=2a00:1450:4864:20::42f; envelope-from=philmd@linaro.org; helo=mail-wr1-x42f.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=unavailable 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+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @linaro.org) X-ZM-MESSAGEID: 1696845897793100007 Rename the global variable to avoid: tests/unit/test-coroutine.c:430:11: error: declaration shadows a variable= in the global scope [-Werror,-Wshadow] bool *done =3D opaque; ^ tests/unit/test-coroutine.c:438:10: error: declaration shadows a variable= in the global scope [-Werror,-Wshadow] bool done =3D false; ^ tests/unit/test-coroutine.c:198:12: note: previous declaration is here static int done; ^ Signed-off-by: Philippe Mathieu-Daud=C3=A9 Reviewed-by: Thomas Huth --- tests/unit/test-coroutine.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/tests/unit/test-coroutine.c b/tests/unit/test-coroutine.c index b0d21d673a..29695cbdcb 100644 --- a/tests/unit/test-coroutine.c +++ b/tests/unit/test-coroutine.c @@ -195,7 +195,7 @@ static void test_no_dangling_access(void) } =20 static bool locked; -static int done; +static int done_count; =20 static void coroutine_fn mutex_fn(void *opaque) { @@ -206,7 +206,7 @@ static void coroutine_fn mutex_fn(void *opaque) qemu_coroutine_yield(); locked =3D false; qemu_co_mutex_unlock(m); - done++; + done_count++; } =20 static void coroutine_fn lockable_fn(void *opaque) @@ -218,7 +218,7 @@ static void coroutine_fn lockable_fn(void *opaque) qemu_coroutine_yield(); locked =3D false; qemu_lockable_unlock(x); - done++; + done_count++; } =20 static void do_test_co_mutex(CoroutineEntry *entry, void *opaque) @@ -226,7 +226,7 @@ static void do_test_co_mutex(CoroutineEntry *entry, voi= d *opaque) Coroutine *c1 =3D qemu_coroutine_create(entry, opaque); Coroutine *c2 =3D qemu_coroutine_create(entry, opaque); =20 - done =3D 0; + done_count =3D 0; qemu_coroutine_enter(c1); g_assert(locked); qemu_coroutine_enter(c2); @@ -235,11 +235,11 @@ static void do_test_co_mutex(CoroutineEntry *entry, v= oid *opaque) * terminates. */ qemu_coroutine_enter(c1); - g_assert_cmpint(done, =3D=3D, 1); + g_assert_cmpint(done_count, =3D=3D, 1); g_assert(locked); =20 qemu_coroutine_enter(c2); - g_assert_cmpint(done, =3D=3D, 2); + g_assert_cmpint(done_count, =3D=3D, 2); g_assert(!locked); } =20 --=20 2.41.0