From nobody Thu Nov 28 00:30:34 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