From patchwork Fri Oct 27 09:37:00 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Thomas Huth X-Patchwork-Id: 738657 Delivered-To: patch@linaro.org Received: by 2002:a5d:5101:0:b0:32d:baff:b0ca with SMTP id s1csp329217wrt; Fri, 27 Oct 2023 02:38:05 -0700 (PDT) X-Google-Smtp-Source: AGHT+IEfqbH5Q2zxE0WokOkixIBp6qnLQ0M+Nibw2JkF42tK67eWUrzjqkq4ExIg70UgMnSIXxuH X-Received: by 2002:ad4:5c47:0:b0:66d:62b7:53f4 with SMTP id a7-20020ad45c47000000b0066d62b753f4mr3345168qva.45.1698399485294; Fri, 27 Oct 2023 02:38:05 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1698399485; cv=none; d=google.com; s=arc-20160816; b=l448yC8hb9KOne+E6XBblmElkK+2xn2vj+ylRcPV9eXAxE/IyWl2ppvhd95Tw+bpFp Pc7YE6+OtOm+yBzfeggCOin9UPfRc/4+o7INDcOO4hhEyBgg/2H3Oa6f/oeZM60ii+jE TUymZd+ULmLo+NKXJyxAsjb5ne6kxkrFgdI1QBDpGvAvLV4yKCkwHYMV8JEGRpfnX0wi Jkrz6AUi4dBU0mE2aP9xEZr6EaZ1zLgn/YVCDJp8CHC4OP2e9FUsPYNfG2AYRYECiOZa 5lXkqOH2T3jVxxyBJXjC2/I2ZBLTBwZLda78k5imA4GP2AeR06dTA1zX3EokHwX9SVjM eqAw== 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=PkDoNhXrEs6DDLniA7+cCqorQe2ZGbpgA9TWmT9RxzA=; fh=mKYVeSjHJKUvhIoxLlaWoOhsu0/LFnbJdOZ+CRgqMEY=; b=xpRaLTnxMBllLkBRDMZ3lAF3AinYWSXf8Xw/5uNfWFs7ke992JnMr/f/0hc906IxYl MD/cRRA+rSYifbcQ4l2CVMGoFOOg4OjVzPj1y3w2zZd3y9jn6yxotR/+KtVqCODk4lh3 yMDa8FQlrHWbi07yOpgzhwGGTYjaMVa+G/klHa5Blzgg5EL9cf9jhn17i8vFkgrD4O8M VrZFitiEpGsXhYE6T72khqcvon7TnM8GheY4/x5VHTpOuAr8Nm67rA8SjGriLVVlaFHt mFQXgpUGyj/BFzZCw5JD4GAFF91Yu389NNSQhOazdWdlIpxwQj85RFeNmrv9KnP4yK0W FI7w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=Yhps1ZGZ; 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=redhat.com Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id bs33-20020a05620a472100b007756a7b3dfasi474770qkb.503.2023.10.27.02.38.05 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Fri, 27 Oct 2023 02:38:05 -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=@redhat.com header.s=mimecast20190719 header.b=Yhps1ZGZ; 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=redhat.com Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qwJHS-0002NY-Fk; Fri, 27 Oct 2023 05:37:26 -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 1qwJHQ-0002MU-Do for qemu-devel@nongnu.org; Fri, 27 Oct 2023 05:37:24 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.133.124]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qwJHO-0002kt-TI for qemu-devel@nongnu.org; Fri, 27 Oct 2023 05:37:24 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1698399442; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=PkDoNhXrEs6DDLniA7+cCqorQe2ZGbpgA9TWmT9RxzA=; b=Yhps1ZGZv1s26+fef83SpRofrMZly3iIKqsGrBIyCfW7N0EK38tMaNdCX7oO8+747ThXow w0MEpqgjCygSFQrgSl02OHFD/YCoRgxgPVyVmnVnCJRYpw2VMf6Fc/O/fWbgqAWw6xlyf4 J6fASfGnn4L5GJQn2yk8GvWLdtPSB4g= Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-442-lyjEXZ2hOHm3E2pRISMDAg-1; Fri, 27 Oct 2023 05:37:13 -0400 X-MC-Unique: lyjEXZ2hOHm3E2pRISMDAg-1 Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.rdu2.redhat.com [10.11.54.3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 0889B88D711; Fri, 27 Oct 2023 09:37:13 +0000 (UTC) Received: from thuth-p1g4.redhat.com (unknown [10.39.192.196]) by smtp.corp.redhat.com (Postfix) with ESMTP id 25A551121319; Fri, 27 Oct 2023 09:37:12 +0000 (UTC) From: Thomas Huth To: qemu-devel@nongnu.org Cc: Stefan Hajnoczi , =?utf-8?q?Philippe_Mathieu-Daud?= =?utf-8?q?=C3=A9?= Subject: [PULL 01/11] system/qtest: Clean up global variable shadowing in qtest_server_init() Date: Fri, 27 Oct 2023 11:37:00 +0200 Message-ID: <20231027093710.273558-2-thuth@redhat.com> In-Reply-To: <20231027093710.273558-1-thuth@redhat.com> References: <20231027093710.273558-1-thuth@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.4.1 on 10.11.54.3 Received-SPF: pass client-ip=170.10.133.124; envelope-from=thuth@redhat.com; helo=us-smtp-delivery-124.mimecast.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, DKIMWL_WL_HIGH=-0.001, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H3=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org From: Philippe Mathieu-Daudé Rename the variable to fix: softmmu/qtest.c:869:13: error: declaration shadows a variable in the global scope [-Werror,-Wshadow] Object *qtest; ^ softmmu/qtest.c:53:15: note: previous declaration is here static QTest *qtest; ^ Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Thomas Huth Message-ID: <20231009100251.56019-2-philmd@linaro.org> Signed-off-by: Thomas Huth --- system/qtest.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/system/qtest.c b/system/qtest.c index 35b643a274..7964f0b248 100644 --- a/system/qtest.c +++ b/system/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; chr = qemu_chr_new("qtest", qtest_chrdev, NULL); if (chr == NULL) { @@ -875,18 +875,18 @@ void qtest_server_init(const char *qtest_chrdev, const char *qtest_log, Error ** return; } - qtest = object_new(TYPE_QTEST); - object_property_set_str(qtest, "chardev", chr->label, &error_abort); + qobj = 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); } static bool qtest_server_start(QTest *q, Error **errp) From patchwork Fri Oct 27 09:37:01 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Thomas Huth X-Patchwork-Id: 738661 Delivered-To: patch@linaro.org Received: by 2002:a5d:5101:0:b0:32d:baff:b0ca with SMTP id s1csp329796wrt; Fri, 27 Oct 2023 02:39:42 -0700 (PDT) X-Google-Smtp-Source: AGHT+IFzh5dv+RDaF8roRSXD3N33O6uU12a1q1d2gfnu+S1iPLYwjrNz4njRuZeXw3XfNA79Vez+ X-Received: by 2002:a05:620a:40c2:b0:775:c5bb:1df9 with SMTP id g2-20020a05620a40c200b00775c5bb1df9mr2421578qko.60.1698399581774; Fri, 27 Oct 2023 02:39:41 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1698399581; cv=none; d=google.com; s=arc-20160816; b=lXNWx1qazMxyLkS/ba/HiaOezkHI2IluzcnpOfZ8G/bVcyVpxfbPo6djke/N9Xm6kw 85CWDj9Taarfh6WEKYI2HwijMXk3Pz+mr+TyC5xA3W/V5NgZLWFA3ZNOTUNGz7eQsoeo bv0Vk07rGGzHAS/d07efvg9sgJ48JBoYZKDAm5B8ZrjXaRRh2xkgSlczPB3rCum4YMsF 6cquK0q8Goaq7JyyHGhG9EY7zFM/ugEaA/xYcE1xteva9BSGvh1Zetzv6cAZpmGQkJd3 vOs2Ks3Oi2IEKjroHagrsG1vZSNrwvLLDdvLekXa1to+umURmYh0Lmpp/11H/uyumAUg qG5A== 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=hEgCgFnTAoeNOn2fWUZ+FE/CsbPbDRXUi3jBdNlv0VA=; fh=rqGQLbSc8GyYHuLYzbGd7cf3pGDU/UNP1g2SZADFNpY=; b=RBBrkygWQKpYYM+bScIjGgktJenpRPLurmGFVD6Q34Pj1opJlg9JMWeyxafdUw+Dxr A1Xz9CKlR9cq4YgCOOzAOdJJa+GdNk6Tqby/hPbqpROA8C+Y/LqMd3W004f6O/fO/JYw uhOs8ky3vhQ8bu1EfCuBE6S92GajFlSWpm9gv1tuK5BdBi5SvG3PEVyD5+TB9j40CZ/z VHB7cqk9ONjerr5RpCa5JYAZreFcQi5WRtsfLBQCPqs+SM7QXyBY5JSToYBpljs9+22a zOm55aTYGuIlHbiYq2F/o2nKp/R+5HpGFVEocm4VjKWF2dkB/ENAqYm1xmNg9nhN7hZS PTgQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=RIntQAYA; 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=redhat.com Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id bs33-20020a05620a472100b007680efd52bdsi488314qkb.368.2023.10.27.02.39.41 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Fri, 27 Oct 2023 02:39:41 -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=@redhat.com header.s=mimecast20190719 header.b=RIntQAYA; 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=redhat.com Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qwJHQ-0002MP-As; Fri, 27 Oct 2023 05:37:24 -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 1qwJHO-0002Lf-6I for qemu-devel@nongnu.org; Fri, 27 Oct 2023 05:37:22 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.129.124]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qwJHM-0002kB-Q0 for qemu-devel@nongnu.org; Fri, 27 Oct 2023 05:37:21 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1698399439; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=hEgCgFnTAoeNOn2fWUZ+FE/CsbPbDRXUi3jBdNlv0VA=; b=RIntQAYAV2aAcpJSrIKBkM4zNPqIfTClrxcbDSJ/FCrCM4gUMwYECnPjZe3BA9KXiTwlPw 1ag7VE9DQDSJZHuX2CaLPzSAAuPbsOXgyaN4QjtV/E55pdPDImuA1L/rB0J/aIr6nkUeeW ZFtq5bLvSgHa7ay65xk5zOO+8RcW/zY= Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-357-8YFFD0jAP_uI2UGIATpykg-1; Fri, 27 Oct 2023 05:37:14 -0400 X-MC-Unique: 8YFFD0jAP_uI2UGIATpykg-1 Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.rdu2.redhat.com [10.11.54.3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 9366E88D70C; Fri, 27 Oct 2023 09:37:14 +0000 (UTC) Received: from thuth-p1g4.redhat.com (unknown [10.39.192.196]) by smtp.corp.redhat.com (Postfix) with ESMTP id 9081F1121319; Fri, 27 Oct 2023 09:37:13 +0000 (UTC) From: Thomas Huth To: qemu-devel@nongnu.org Cc: Stefan Hajnoczi , =?utf-8?q?Philippe_Mathieu-Daud?= =?utf-8?q?=C3=A9?= , Alberto Garcia Subject: [PULL 02/11] tests/throttle: Clean up global variable shadowing Date: Fri, 27 Oct 2023 11:37:01 +0200 Message-ID: <20231027093710.273558-3-thuth@redhat.com> In-Reply-To: <20231027093710.273558-1-thuth@redhat.com> References: <20231027093710.273558-1-thuth@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.4.1 on 10.11.54.3 Received-SPF: pass client-ip=170.10.129.124; envelope-from=thuth@redhat.com; helo=us-smtp-delivery-124.mimecast.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, DKIMWL_WL_HIGH=-0.001, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H4=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org From: Philippe Mathieu-Daudé 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é Acked-by: Alberto Garcia Message-ID: <20231009100251.56019-3-philmd@linaro.org> Signed-off-by: Thomas Huth --- 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 testing bps or ops */ { THROTTLE_OPS_TOTAL, THROTTLE_OPS_READ, THROTTLE_OPS_WRITE, } }; - ThrottleConfig cfg; BucketType index; int i; From patchwork Fri Oct 27 09:37:02 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Thomas Huth X-Patchwork-Id: 738654 Delivered-To: patch@linaro.org Received: by 2002:a5d:5101:0:b0:32d:baff:b0ca with SMTP id s1csp329113wrt; Fri, 27 Oct 2023 02:37:43 -0700 (PDT) X-Google-Smtp-Source: AGHT+IEG039AfrHYgbjZ2SXv41+rJEcA3eWGTx9WDLCioAdua70un+bofdYNKZuWUY39Iis2iAIP X-Received: by 2002:a05:622a:1309:b0:40b:9015:7eee with SMTP id v9-20020a05622a130900b0040b90157eeemr2216269qtk.8.1698399463309; Fri, 27 Oct 2023 02:37:43 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1698399463; cv=none; d=google.com; s=arc-20160816; b=bTDLSTF54tBKk96eO24pfk93DG1CYIshDGJISAOatMdnfv++1NvUkxQT5TdfPADeSg 6KZNjDleT905yFZcDRDHnabbbWprLqV17uOthYsU/oLaPoSLzJC+AOUz3WA6g5jZrFTv ox0SJAErEoCX0GFZCZ6CTXHoolXsYnYAsgXFAqSOE/ZmUBeZkgECtZsbVREW3h7qmIJY w2M09nyEWZUnaCxVR1bShW8VfEphRNNFT9yBOdWn/GXegde4tiM8DyopbaB76478WNPw QarvJP3GDgLP6+2yV6Q3S7cFDWknVfHmgwmFN94icMMR5sRzhrTAue80o5rw7DXxlvTE 0fQQ== 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=ejfR3tG+ALRFLzO/F9Cf1UhOQnGFzqz7rSC5v/ESiyo=; fh=v4Od8AV8CasN/MSPHyLLRlMoMNLi4w2e4OnGqcWrA1Y=; b=0dO8S9F1Np58KAjKfreqGV6JHoEaxstK6WjJgVPrsETWrgZl63Nj94NjSqGawIcZZU Q1l2WHCqlHwhraskUX03Wb39wR2efcVsyaKDB0D7ZgpaaqEZYMWP1EZeHRKl4txmPAH1 1bkj7Aq/cvUYaIHPPwDfkzWveRi0zCa8Ccj4ps7bajYC+4Uq2JOwjmYRJZXHxg4uTbL/ SQBUh9S6YtLY9VNDRoNxWp33ym+sWd/wrbExFDafgVCPE32xKBIYVseBlBgTCtQIjGwI 1Lvj/kievQb/EzXy2ImuQM3bTDRL24cT37aeqFvzvXYbeEqB4hmRf/shZw9jYP8I1+RR 4IbA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=Usl+cGj5; 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=redhat.com Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id w20-20020a05622a191400b0041cb481b946si553229qtc.389.2023.10.27.02.37.43 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Fri, 27 Oct 2023 02:37:43 -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=@redhat.com header.s=mimecast20190719 header.b=Usl+cGj5; 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=redhat.com Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qwJHP-0002MF-Kt; Fri, 27 Oct 2023 05:37:23 -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 1qwJHN-0002LX-TG for qemu-devel@nongnu.org; Fri, 27 Oct 2023 05:37:21 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.129.124]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qwJHM-0002kE-Ei for qemu-devel@nongnu.org; Fri, 27 Oct 2023 05:37:21 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1698399439; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=ejfR3tG+ALRFLzO/F9Cf1UhOQnGFzqz7rSC5v/ESiyo=; b=Usl+cGj5D0uUKWh8j6fpkAWSwd8pJ1usxI8ckl67Xo5/MIsGJKGjR3tjSbQSo1pL7GmorE 8qwpHd0gefLJQh6ZOSS7hj6vGxvC9x96MeJ7pI0rDCufSDwxMM0CCNT5+RcUQNEVvFVkKm PuLKoI6z9pRORY+jFHFVXYM4QZ81lQM= Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-533-wFrkwvDDPwm8agaNAcoXQA-1; Fri, 27 Oct 2023 05:37:16 -0400 X-MC-Unique: wFrkwvDDPwm8agaNAcoXQA-1 Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.rdu2.redhat.com [10.11.54.3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 06AF084B105; Fri, 27 Oct 2023 09:37:16 +0000 (UTC) Received: from thuth-p1g4.redhat.com (unknown [10.39.192.196]) by smtp.corp.redhat.com (Postfix) with ESMTP id E72A11121319; Fri, 27 Oct 2023 09:37:14 +0000 (UTC) From: Thomas Huth To: qemu-devel@nongnu.org Cc: Stefan Hajnoczi , =?utf-8?q?Philippe_Mathieu-Daud?= =?utf-8?q?=C3=A9?= , Emmanouil Pitsidianakis Subject: [PULL 03/11] tests/virtio-scsi: Clean up global variable shadowing Date: Fri, 27 Oct 2023 11:37:02 +0200 Message-ID: <20231027093710.273558-4-thuth@redhat.com> In-Reply-To: <20231027093710.273558-1-thuth@redhat.com> References: <20231027093710.273558-1-thuth@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.4.1 on 10.11.54.3 Received-SPF: pass client-ip=170.10.129.124; envelope-from=thuth@redhat.com; helo=us-smtp-delivery-124.mimecast.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, DKIMWL_WL_HIGH=-0.001, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H4=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org From: Philippe Mathieu-Daudé 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 variable 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é Reviewed-By: Emmanouil Pitsidianakis Reviewed-by: Thomas Huth Message-ID: <20231009100251.56019-4-philmd@linaro.org> Signed-off-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(QVirtioDevice *dev) return vs; } -static void hotplug(void *obj, void *data, QGuestAllocator *alloc) +static void hotplug(void *obj, void *data, QGuestAllocator *t_alloc) { QTestState *qts = global_qtest; From patchwork Fri Oct 27 09:37:03 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Thomas Huth X-Patchwork-Id: 738655 Delivered-To: patch@linaro.org Received: by 2002:a5d:5101:0:b0:32d:baff:b0ca with SMTP id s1csp329128wrt; Fri, 27 Oct 2023 02:37:46 -0700 (PDT) X-Google-Smtp-Source: AGHT+IEVxSRpHTqa1sLJe4xjym5DcnFVzaN0GCueQq6cOz6ZdDK1gV9GO5+blJoxQPY1hg2zDLnp X-Received: by 2002:a05:6214:300e:b0:66d:9f49:5b24 with SMTP id ke14-20020a056214300e00b0066d9f495b24mr3019460qvb.23.1698399466138; Fri, 27 Oct 2023 02:37:46 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1698399466; cv=none; d=google.com; s=arc-20160816; b=AZDQYtcwap8hlfLLWu3FnunV2KKYKLeo55CF3VPxAnKPNQ26O2p825jLZJMgudU8jU NYjpQvuF50sK+ooy3n8Hu6U0LiC8frsKQrekmAKWdHxmyI1bQaGVi3tSmBSO8UtG1CVQ cgiGx2YbBaKVriAKdge3nOuKu3ZUQnJ4frG3H2weh2JPLHGuXHWS/qbyBaisNscXCIMt eWDA0wkcszWyDAe9zPGcoQVqwse82iQLpFcDq6fluOngrRl4LDVOF6HxMXnct3jD2oyY BFgPeDHXovpFSq/PzD/MK231sPDEB34lRhMT1aD1QTKPIqL/0j4aPQVA0H+u7RQ87202 ab6A== 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=NfKV4Wmcj2IFfSf8qrmIR+on92b5inTdWwqBINKhRi4=; fh=vDP7iaeRZ7w5W+pThQHglATn6XAppn2nWv4y1zgadPo=; b=HaSGGCeHhZTuBfeFjGvuldu/3USPL3yAF+sUefrTxrLYD2d9iyANU3RapqZ2Stx+6P mNgnJBxSjX9ZzAdVOIzmiUZG75u/Laxxvg4jQJcGf4YXhFAULQVwe8VaM2Gmo6v75ZmE drEia+wq2kHAy3TaPAaY6lOm+luFcr2Oda0eLKPWA0IhJKeISWhVx7BluNw/gL7O7dzL zv5uiFwEOqzmPYGULNPwvw8KwrtxonjnMn3pARww7Sx0Maimfvjo4Yg91Xkv0R/RboIp xlkO2j91CK2IikC+Q/KU/JXnYJMQPTXOxOQKIeblpWd4EFTUg2X8bG8qrAy3DIwe5ySJ eBKg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=U3o6k2t5; 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=redhat.com Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id g5-20020ad457a5000000b006588de6ae6csi580286qvx.266.2023.10.27.02.37.45 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Fri, 27 Oct 2023 02:37:46 -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=@redhat.com header.s=mimecast20190719 header.b=U3o6k2t5; 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=redhat.com Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qwJHR-0002NL-VD; Fri, 27 Oct 2023 05:37:25 -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 1qwJHP-0002M6-EL for qemu-devel@nongnu.org; Fri, 27 Oct 2023 05:37:23 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.129.124]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qwJHO-0002kb-1p for qemu-devel@nongnu.org; Fri, 27 Oct 2023 05:37:23 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1698399441; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=NfKV4Wmcj2IFfSf8qrmIR+on92b5inTdWwqBINKhRi4=; b=U3o6k2t5X18yPcDJWF1Lqjv0hLpCZkO0dKRXpAUxLEtJAe9nRQPefdFi73dTSnmUsPDSfU qI8xPv1FMDBoQQsSiwW5qWWcCzbEV0Zq6wItJLepBQ36bGbBe56h9ff0s5bZ6VWqOkeMxb 4sLPZrI5+rxQZKMjzCLT0R1j+Nsn9uI= Received: from mimecast-mx02.redhat.com (mx-ext.redhat.com [66.187.233.73]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-449-mTI2C3GKNiGZV6axrg7HYQ-1; Fri, 27 Oct 2023 05:37:17 -0400 X-MC-Unique: mTI2C3GKNiGZV6axrg7HYQ-1 Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.rdu2.redhat.com [10.11.54.3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 9D2B23C0E645; Fri, 27 Oct 2023 09:37:17 +0000 (UTC) Received: from thuth-p1g4.redhat.com (unknown [10.39.192.196]) by smtp.corp.redhat.com (Postfix) with ESMTP id 61C121121319; Fri, 27 Oct 2023 09:37:16 +0000 (UTC) From: Thomas Huth To: qemu-devel@nongnu.org Cc: Stefan Hajnoczi , =?utf-8?q?Philippe_Mathieu-Daud?= =?utf-8?q?=C3=A9?= , John Snow Subject: [PULL 04/11] tests/cdrom-test: Clean up global variable shadowing in prepare_image() Date: Fri, 27 Oct 2023 11:37:03 +0200 Message-ID: <20231027093710.273558-5-thuth@redhat.com> In-Reply-To: <20231027093710.273558-1-thuth@redhat.com> References: <20231027093710.273558-1-thuth@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.4.1 on 10.11.54.3 Received-SPF: pass client-ip=170.10.129.124; envelope-from=thuth@redhat.com; helo=us-smtp-delivery-124.mimecast.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, DKIMWL_WL_HIGH=-0.001, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H4=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org From: Philippe Mathieu-Daudé 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[] = "cdrom-boot-iso-XXXXXX"; ^ Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: John Snow Message-ID: <20231009100251.56019-5-philmd@linaro.org> Signed-off-by: Thomas Huth --- 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; } -static int prepare_image(const char *arch, char *isoimage) +static int prepare_image(const char *arch, char *isoimagepath) { char srcdir[] = "cdrom-test-dir-XXXXXX"; char *codefile = NULL; int ifh, ret = -1; const char *args[] = { "xorrisofs", "-quiet", "-l", "-no-emul-boot", - "-b", NULL, "-o", isoimage, srcdir, NULL + "-b", NULL, "-o", isoimagepath, srcdir, NULL }; - ifh = mkstemp(isoimage); + ifh = mkstemp(isoimagepath); if (ifh < 0) { perror("Error creating temporary iso image file"); return -1; From patchwork Fri Oct 27 09:37:04 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Thomas Huth X-Patchwork-Id: 738660 Delivered-To: patch@linaro.org Received: by 2002:a5d:5101:0:b0:32d:baff:b0ca with SMTP id s1csp329700wrt; Fri, 27 Oct 2023 02:39:25 -0700 (PDT) X-Google-Smtp-Source: AGHT+IGHMHhzJnWPYCDwAoPO5vjdCI7KnrA1yw4ZbHlD71beuKRBKQmwzx4rP2/D8tsu8PvGzgep X-Received: by 2002:a0c:aa94:0:b0:66d:1540:f9ef with SMTP id f20-20020a0caa94000000b0066d1540f9efmr1843409qvb.44.1698399565147; Fri, 27 Oct 2023 02:39:25 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1698399565; cv=none; d=google.com; s=arc-20160816; b=nU1FapQ0Zb/PNjoOgp8qMbs7N5hPGzNMZ8O00y8h/DgdJv143Q079fvnV0spOJ9r5E 6VvuNENy12MGsjBnNl4MJammHDN0FYD/+5OnemyYQ/ovEZ82hkqcpdkbCEsP2rNS22a0 qeCK6duORj29Rk9p/1EmN4fpFCESUW9nJpfONtubzS+C6RNewA2e29hi0wA028MhrNev 1ipUIFlXPoudDftODo2FdZWXnovKuiyZCMJ1vSOX90MDH9Wa5f0EbBkKQDxQEiMgTrEJ //i4vOWm+81X9aFR15GIvpYiz4DaAqCTYT+Pzq3tzblhLbXIIlGk8kt31zk1nFmb8aV6 a2rQ== 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=UHFVGbN3Z5J3QkZ+IMc8CUg9xV8BBIbMridlp9wflug=; fh=mKYVeSjHJKUvhIoxLlaWoOhsu0/LFnbJdOZ+CRgqMEY=; b=l9EoSpqvJpDbSJnXZUTb7OxDaJbZmPryDejXN8uX1UFxGBabI8eCF/WhnNPQGMXJRK WwcaoaVbrwwHsVdqaA1EvN3bs1Uw+uCFelCu6U54l6t2YmQ9q0CQzxyO0HoPiOCtGYIo Xhlzx9DV3YgOpmnma9BLl6/O+7dxczFe4kcTdegcsG3HeBhXl7rlBPhL5aCNijz1aGoU hIq7uF/vT0V9pUlskt4KyS1IgsAyAEHmC38Rz6uP+mhMD75pSp/adHjWttAgB79bJC/q Rl4l3uYFdNFC+Tr7fHPUwkNhXFRN7UkfHa97yAjo2Azw5hQq5+UWtMWjILhMh57gnOY4 juWg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=UGvBHPbx; 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=redhat.com Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id m10-20020ad4448a000000b0066d21602c30si582947qvt.351.2023.10.27.02.39.24 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Fri, 27 Oct 2023 02:39:25 -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=@redhat.com header.s=mimecast20190719 header.b=UGvBHPbx; 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=redhat.com Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qwJHQ-0002MM-6d; Fri, 27 Oct 2023 05:37:24 -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 1qwJHP-0002Lp-3p for qemu-devel@nongnu.org; Fri, 27 Oct 2023 05:37:23 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.133.124]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qwJHN-0002kU-Ha for qemu-devel@nongnu.org; Fri, 27 Oct 2023 05:37:22 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1698399441; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=UHFVGbN3Z5J3QkZ+IMc8CUg9xV8BBIbMridlp9wflug=; b=UGvBHPbxUswiQIKwcc8NQkhDlGLnbI0euZGb5mO7+NQ/btZO2YUCmEUFn1kr1Nugk3LV8A JwyGRDmZUA9IihtpuF0oetdf0q0V0fOm3MKf/vRv3UpTaw0RYNUmNpmniPRt3yBtwaIqWc VhZ08fz5FcPd7djXoVUYRmAK//jkTn8= Received: from mimecast-mx02.redhat.com (mx-ext.redhat.com [66.187.233.73]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-470-BVhm_uibNY6tOtLMnTWTlg-1; Fri, 27 Oct 2023 05:37:19 -0400 X-MC-Unique: BVhm_uibNY6tOtLMnTWTlg-1 Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.rdu2.redhat.com [10.11.54.3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id F32673813BC6; Fri, 27 Oct 2023 09:37:18 +0000 (UTC) Received: from thuth-p1g4.redhat.com (unknown [10.39.192.196]) by smtp.corp.redhat.com (Postfix) with ESMTP id EA7DA1121319; Fri, 27 Oct 2023 09:37:17 +0000 (UTC) From: Thomas Huth To: qemu-devel@nongnu.org Cc: Stefan Hajnoczi , =?utf-8?q?Philippe_Mathieu-Daud?= =?utf-8?q?=C3=A9?= Subject: [PULL 05/11] tests/rtl8139: Clean up global variable shadowing Date: Fri, 27 Oct 2023 11:37:04 +0200 Message-ID: <20231027093710.273558-6-thuth@redhat.com> In-Reply-To: <20231027093710.273558-1-thuth@redhat.com> References: <20231027093710.273558-1-thuth@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.4.1 on 10.11.54.3 Received-SPF: pass client-ip=170.10.133.124; envelope-from=thuth@redhat.com; helo=us-smtp-delivery-124.mimecast.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, DKIMWL_WL_HIGH=-0.001, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H3=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org From: Philippe Mathieu-Daudé Rename the variable to fix: tests/qtest/rtl8139-test.c:28:33: error: declaration shadows a variable in 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 in 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é Reviewed-by: Thomas Huth Message-ID: <20231009100251.56019-7-philmd@linaro.org> Signed-off-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 static QPCIBus *pcibus; -static QPCIDevice *dev; +static QPCIDevice *pcidev; static QPCIBar dev_bar; 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 = qpci_io_read##len(dev, dev_bar, (val)); \ + unsigned res = qpci_io_read##len(pcidev, dev_bar, (val)); \ if (verbosity_level >= 2) { \ g_test_message("*%s -> %x", #name, res); \ } \ @@ -57,7 +57,7 @@ static void out_##name(unsigned v) \ if (verbosity_level >= 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); \ } PORT(Timer, l, 0x48) @@ -189,11 +189,11 @@ static void test_init(void) { uint64_t barsize; - dev = get_device(); + pcidev = get_device(); - dev_bar = qpci_iomap(dev, 0, &barsize); + dev_bar = qpci_iomap(pcidev, 0, &barsize); - qpci_device_enable(dev); + qpci_device_enable(pcidev); test_timer(); } From patchwork Fri Oct 27 09:37:05 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Thomas Huth X-Patchwork-Id: 738658 Delivered-To: patch@linaro.org Received: by 2002:a5d:5101:0:b0:32d:baff:b0ca with SMTP id s1csp329407wrt; Fri, 27 Oct 2023 02:38:34 -0700 (PDT) X-Google-Smtp-Source: AGHT+IFVOzg20KAHtGDIt+Ow2ErkI9DrEBsakqFjrG7GgY80ygprgJvy0o9Giggr/CIlqDPCTmQm X-Received: by 2002:a05:6214:2588:b0:66d:3c5:1cdc with SMTP id fq8-20020a056214258800b0066d03c51cdcmr2459813qvb.60.1698399513894; Fri, 27 Oct 2023 02:38:33 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1698399513; cv=none; d=google.com; s=arc-20160816; b=hg3DSPBomoXHCn3msx4+IDi5qBj6UAMnqAzfozXwJTnJb1fXWuH3zQuYJtmLchQuEA 0WdP/38ONnuu5ryoXt9PxG7/b7v33LOp++N+QAzetb4JoJYFhe1oL048ciskRJ0jOn2H ssyCPSifSGo3Jxxh3y1y/vL1+Rrj24kXpcL3T8e5WZWzC3c76N5voN9igF7lftgSqxOf /WzdBerh8kiC1iFnLyGB/EenAdUGi6a2M2dxhz4UDL2Db3lO/jC68VTcx5+KVnFhWxzF RSz8N2RK9w3w5cta9hepBeyeMhefXFMMCNiQbu5Q32+MSQB+KGG1RKa81PEZkNzM/pKv PJFQ== 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=oxWl9KC5kTvsQct/HyKKr/qVl12ZnY8mw3Eg5JythuE=; fh=mKYVeSjHJKUvhIoxLlaWoOhsu0/LFnbJdOZ+CRgqMEY=; b=R6tt4meUPTLb9c8NviEZYT7deT9zSvtJxE8+R1nAfQAv15fpsmGn9JT90OvJ39WRhy 4F2w9RMtRuhVsbOcD3wFIEK4PsN1bBuBisbyQ9kr51Yuuxe2fs2zbNd8MrOM6Z4kTI19 y8lsRjhj1Kvw4cJUn1uz99qDvAk4SWSy5Odsu5GyOlI+P2LIpJCv6LlFAAB6soK/vKgU rGr+0Bk8AQiV1ISoScZSzdl6eAiT0S35wNOg34NRSOkIs9Nuzcn+a3RfDN0J90WyQAz7 fvmM5LGUNESEdduTJmIHHfKH2SStQh877WEoih8xz5mFDsnJf5pLvlFkL4F5PqU+eDSd HEQQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=YPZHyz9h; 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=redhat.com Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id q13-20020ad45cad000000b0064c6b7d96e1si595636qvh.372.2023.10.27.02.38.33 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Fri, 27 Oct 2023 02:38:33 -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=@redhat.com header.s=mimecast20190719 header.b=YPZHyz9h; 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=redhat.com Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qwJHV-0002Os-4R; Fri, 27 Oct 2023 05:37:29 -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 1qwJHT-0002O7-7b for qemu-devel@nongnu.org; Fri, 27 Oct 2023 05:37:27 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.133.124]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qwJHR-0002lZ-6f for qemu-devel@nongnu.org; Fri, 27 Oct 2023 05:37:26 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1698399444; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=oxWl9KC5kTvsQct/HyKKr/qVl12ZnY8mw3Eg5JythuE=; b=YPZHyz9hZnoup5fd0KrYOF/BoiKwvCoJLFA9fk417KU8ICFnobg+mYXP5gxvF/NDyPbMyS KJ42xAcDoZcxksAn/CNomCxKjhOi6tU3PWu9GHpcpc+Kq70CISj5RQoWytZW6RlZklU4Mv xt9VsG6bvH1eWDI29CF2zCDZNG9FxZQ= Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-206-jFgwyM0HMeyr9RMnxkQzxg-1; Fri, 27 Oct 2023 05:37:21 -0400 X-MC-Unique: jFgwyM0HMeyr9RMnxkQzxg-1 Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.rdu2.redhat.com [10.11.54.3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id A3689101A529; Fri, 27 Oct 2023 09:37:20 +0000 (UTC) Received: from thuth-p1g4.redhat.com (unknown [10.39.192.196]) by smtp.corp.redhat.com (Postfix) with ESMTP id 758111121320; Fri, 27 Oct 2023 09:37:19 +0000 (UTC) From: Thomas Huth To: qemu-devel@nongnu.org Cc: Stefan Hajnoczi , =?utf-8?q?Philippe_Mathieu-Daud?= =?utf-8?q?=C3=A9?= Subject: [PULL 06/11] tests/npcm7xx_adc: Clean up global variable shadowing Date: Fri, 27 Oct 2023 11:37:05 +0200 Message-ID: <20231027093710.273558-7-thuth@redhat.com> In-Reply-To: <20231027093710.273558-1-thuth@redhat.com> References: <20231027093710.273558-1-thuth@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.4.1 on 10.11.54.3 Received-SPF: pass client-ip=170.10.133.124; envelope-from=thuth@redhat.com; helo=us-smtp-delivery-124.mimecast.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, DKIMWL_WL_HIGH=-0.001, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H3=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org From: Philippe Mathieu-Daudé Rename the global 'adc' variable in order to avoid: tests/qtest/npcm7xx_adc-test.c:98:58: error: declaration shadows a variable 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 variable 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 variable 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 variable 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 variable 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 variable in the global scope [-Werror,-Wshadow] static void adc_write_vref(QTestState *qts, const ADC *adc, uint32_t value) ^ tests/qtest/npcm7xx_adc-test.c:162:59: error: declaration shadows a variable 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 variable 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 variable in the global scope [-Werror,-Wshadow] const ADC *adc = adc_p; ^ tests/qtest/npcm7xx_adc-test.c:207:16: error: declaration shadows a variable in the global scope [-Werror,-Wshadow] const ADC *adc = adc_p; ^ tests/qtest/npcm7xx_adc-test.c:235:16: error: declaration shadows a variable in the global scope [-Werror,-Wshadow] const ADC *adc = adc_p; ^ tests/qtest/npcm7xx_adc-test.c:267:16: error: declaration shadows a variable in the global scope [-Werror,-Wshadow] const ADC *adc = adc_p; ^ tests/qtest/npcm7xx_adc-test.c:293:16: error: declaration shadows a variable in the global scope [-Werror,-Wshadow] const ADC *adc = adc_p; ^ tests/qtest/npcm7xx_adc-test.c:311:16: error: declaration shadows a variable in the global scope [-Werror,-Wshadow] const ADC *adc = adc_p; ^ tests/qtest/npcm7xx_adc-test.c:93:5: note: previous declaration is here ADC adc = { ^ Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Thomas Huth Message-ID: <20231009100251.56019-8-philmd@linaro.org> Signed-off-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; -ADC adc = { +ADC adc_defs = { .irq = 0, .base_addr = 0xf000c000 }; @@ -367,12 +367,12 @@ int main(int argc, char **argv) { g_test_init(&argc, &argv, NULL); - 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); return g_test_run(); } From patchwork Fri Oct 27 09:37:06 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Thomas Huth X-Patchwork-Id: 738659 Delivered-To: patch@linaro.org Received: by 2002:a5d:5101:0:b0:32d:baff:b0ca with SMTP id s1csp329429wrt; Fri, 27 Oct 2023 02:38:37 -0700 (PDT) X-Google-Smtp-Source: AGHT+IFHT9I0go8TBaheSGscMJ3OBXl4X+rVJ2LJVp9ETX0tUSl6KbgbfAKDnjRlCVvS4GnY0SN0 X-Received: by 2002:ac8:5741:0:b0:41b:b7ff:2342 with SMTP id 1-20020ac85741000000b0041bb7ff2342mr2527051qtx.44.1698399516781; Fri, 27 Oct 2023 02:38:36 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1698399516; cv=none; d=google.com; s=arc-20160816; b=X4/ifmPjCCoIWDgBATUVJ1OR6ZEcBYN2s1l3kXc5nTfdDLmcEo3aH78GCPH33CzMsy OnYj/lJaXbC0La/Cn4IbsJP4wNaf8Nb0UtMdR1nAHQ6LfajPY2Bw/XVrNsmf6bc3iVHi dGSjJBDc3ZY7Ni+Ko7kaLpzu1kXlIPDhFBEH/Nzvn5x/IUw3xeFLDrRPvCVRZIYIwrl2 lhkotNM38a18Pz7PRfSVuOuHRfk70ltmt/1cUz1+U7SdH6dctlTwCVK18J3bHbbu0ThH Xtdj96VXbF5YY4BykKMoxek67HBwitVmhsTik7j4OQEDR+taE5oN9QGMEWtnhbAwY0Ty kTIA== 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=BCNJv8ghV91jJ74e+LHf+QzzbZftotexdatDHwsc+oE=; fh=mKYVeSjHJKUvhIoxLlaWoOhsu0/LFnbJdOZ+CRgqMEY=; b=j62qUsx7Jcv0smMqEBAc7ZBeukjNzoN8Pb0t1dBuBVZNYUjmn5ssvtNZPfNh9jR//h LujAffxIlh7B2H1czBZDwq0KF56EUVrY7HwgqEbMzasYP9zH4lTGOW+KNSdQGosmVxZB 8mgrdmVxg89fP0Eo7ogt9t2NwLsvBEW4kaiMC59MCLlcuZUQ3S3+21KuIOd2iQeeqWDL P4R/j5V+Co/bcyRNsBxySfPE4dD2hqoOq361eWnu6D0gzMEtmRmMu/8MvwVu+y4hSfJs 5d+GhRfr+7gs694C3gmbBc38YOVY8c428LB9BNxJxMUimlKGr/3pXsx2RjBsPpfR8JQQ coRQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=OaYkHlma; 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=redhat.com Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id y15-20020a05622a164f00b00418122a226bsi548837qtj.182.2023.10.27.02.38.36 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Fri, 27 Oct 2023 02:38:36 -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=@redhat.com header.s=mimecast20190719 header.b=OaYkHlma; 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=redhat.com Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qwJHU-0002OI-2Q; Fri, 27 Oct 2023 05:37:28 -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 1qwJHR-0002NK-TR for qemu-devel@nongnu.org; Fri, 27 Oct 2023 05:37:25 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.133.124]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qwJHQ-0002lE-Df for qemu-devel@nongnu.org; Fri, 27 Oct 2023 05:37:25 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1698399443; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=BCNJv8ghV91jJ74e+LHf+QzzbZftotexdatDHwsc+oE=; b=OaYkHlma10//JcuOy9t4dsvkAyLw0WpX9IsKLZhfI0vBtQA8h15AJA/UZxKB+YiC50jeXE xBLZK+OWYbk1Dv1LRB3PyqRcrHk6x/pD/o0pjskyFd+EvLJt0SGuV3F/PnBlR/YVLF9LTB jTKv5iYN4GJPiFfBpiSyNwBGpvzXwbs= Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-556-NCmQOfiTNy-GAm1t5afWLA-1; Fri, 27 Oct 2023 05:37:22 -0400 X-MC-Unique: NCmQOfiTNy-GAm1t5afWLA-1 Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.rdu2.redhat.com [10.11.54.3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id E7C43101A481; Fri, 27 Oct 2023 09:37:21 +0000 (UTC) Received: from thuth-p1g4.redhat.com (unknown [10.39.192.196]) by smtp.corp.redhat.com (Postfix) with ESMTP id 023F61121320; Fri, 27 Oct 2023 09:37:20 +0000 (UTC) From: Thomas Huth To: qemu-devel@nongnu.org Cc: Stefan Hajnoczi , =?utf-8?q?Philippe_Mathieu-Daud?= =?utf-8?q?=C3=A9?= Subject: [PULL 07/11] tests/aio: Clean up global variable shadowing Date: Fri, 27 Oct 2023 11:37:06 +0200 Message-ID: <20231027093710.273558-8-thuth@redhat.com> In-Reply-To: <20231027093710.273558-1-thuth@redhat.com> References: <20231027093710.273558-1-thuth@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.4.1 on 10.11.54.3 Received-SPF: pass client-ip=170.10.133.124; envelope-from=thuth@redhat.com; helo=us-smtp-delivery-124.mimecast.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, DKIMWL_WL_HIGH=-0.001, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H3=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org From: Philippe Mathieu-Daudé Rename the argument to fix: tests/unit/test-aio.c:130:44: error: declaration shadows a variable in the 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é Reviewed-by: Thomas Huth Message-ID: <20231009100251.56019-9-philmd@linaro.org> Signed-off-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; } -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); } static void dummy_notifier_read(EventNotifier *n) From patchwork Fri Oct 27 09:37:07 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Thomas Huth X-Patchwork-Id: 738656 Delivered-To: patch@linaro.org Received: by 2002:a5d:5101:0:b0:32d:baff:b0ca with SMTP id s1csp329138wrt; Fri, 27 Oct 2023 02:37:47 -0700 (PDT) X-Google-Smtp-Source: AGHT+IFmq3QJsPoNEAZK6w01Pa283gxzz4C1VpPfVMSt5FpB2eL0EiGKibhdffwLAbixeAhepN96 X-Received: by 2002:ad4:5967:0:b0:65d:f81:9b47 with SMTP id eq7-20020ad45967000000b0065d0f819b47mr2639971qvb.45.1698399467588; Fri, 27 Oct 2023 02:37:47 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1698399467; cv=none; d=google.com; s=arc-20160816; b=VXXKRQkjh69Jg8BeNTv9/coVOIys64epXNQKdtKODom7T7ZViuKUBYkb1G1eGkkS/S yj4xXy+WX9uAAPIVk5UWcL84B0HrB8YH0J4vl31g1H5ugGHAj7MLtTbDRkKgaWnGLEOW 9jAQ1kesbHOPttZPvnQGJoMv+vmpzOiAhEKP1B0IvzTgfnqY4AqbMOFTrt5RRQh1LSsG GDZuTi7CatqV/6qZrIeRxINZmtobSiPvQCPpEHy55kE+BJBgCwUz/rIL8tQonVuJllUF Ex30QU9gXhZ2/A3dc1IR8c8M/XW70tUXmNhetuevn3GRVKN7ayavwcv2MpmbYiV3p1nl +ljQ== 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=3EGtR8ICZJdFV3k33PAaGnx20Fnaqp2qqlexz1kr+e4=; fh=mKYVeSjHJKUvhIoxLlaWoOhsu0/LFnbJdOZ+CRgqMEY=; b=V18O+74AYA/bc2mpWoJxTNn1gn74BnlfONgwJKJkX5XdfPWiYZN8SxHjEbhz9qqGUb +TZRjmf1HzNiHPL0dLRQtAo/CQS3smeTYhvm7t3OAKaarZUn3kUcLd1F17zyMx5YmiM4 YtEJV5Tkwb9noeIlKCR244lv8HxgUxGEWb6nCYPBc+Q1bI1nQj6Qx4KpefMDHbNjqrAt PyMB+zi0bgbNCgl+ADmSuEZoTBw3ria3CObIUuXqXpRG1HGKU5MeYBi+1Jy9YkFcxxM2 rjILtC46prqEVgRONR7opAU0lPUOeW8m7i7ldMrmHsbtD5cBxFK1xLosruffPm+Fmh1O iLpg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=jLWrH7Y0; 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=redhat.com Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id jl8-20020ad45e88000000b006655efec91asi590762qvb.499.2023.10.27.02.37.47 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Fri, 27 Oct 2023 02:37:47 -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=@redhat.com header.s=mimecast20190719 header.b=jLWrH7Y0; 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=redhat.com Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qwJHV-0002Ow-TW; Fri, 27 Oct 2023 05:37:29 -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 1qwJHU-0002OV-Cc for qemu-devel@nongnu.org; Fri, 27 Oct 2023 05:37:28 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.129.124]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qwJHS-0002m0-Nc for qemu-devel@nongnu.org; Fri, 27 Oct 2023 05:37:28 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1698399446; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=3EGtR8ICZJdFV3k33PAaGnx20Fnaqp2qqlexz1kr+e4=; b=jLWrH7Y0JV2UgBAlYiteXTcXmEz2dQX330CqQQG6Fd58Fs2MD/y9nwfXRTRaVp33knZHta Tlv1K/cN6t332mIWzSnPAqISnj1Z0BP9VbpTGBr8C0nTzT1sUYYn5pM9NSH2vM8rIRBpwL LzT6KF4GyML9v4wymz7Ma666Pn60/us= Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-203-IKZgMaV7NeamH_cH9jYhDg-1; Fri, 27 Oct 2023 05:37:24 -0400 X-MC-Unique: IKZgMaV7NeamH_cH9jYhDg-1 Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.rdu2.redhat.com [10.11.54.3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id D44E4811E7E; Fri, 27 Oct 2023 09:37:23 +0000 (UTC) Received: from thuth-p1g4.redhat.com (unknown [10.39.192.196]) by smtp.corp.redhat.com (Postfix) with ESMTP id 889491121319; Fri, 27 Oct 2023 09:37:22 +0000 (UTC) From: Thomas Huth To: qemu-devel@nongnu.org Cc: Stefan Hajnoczi , =?utf-8?q?Philippe_Mathieu-Daud?= =?utf-8?q?=C3=A9?= Subject: [PULL 08/11] tests/coroutine: Clean up global variable shadowing Date: Fri, 27 Oct 2023 11:37:07 +0200 Message-ID: <20231027093710.273558-9-thuth@redhat.com> In-Reply-To: <20231027093710.273558-1-thuth@redhat.com> References: <20231027093710.273558-1-thuth@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.4.1 on 10.11.54.3 Received-SPF: pass client-ip=170.10.129.124; envelope-from=thuth@redhat.com; helo=us-smtp-delivery-124.mimecast.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, DKIMWL_WL_HIGH=-0.001, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H4=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org From: Philippe Mathieu-Daudé 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 = opaque; ^ tests/unit/test-coroutine.c:438:10: error: declaration shadows a variable in the global scope [-Werror,-Wshadow] bool done = false; ^ tests/unit/test-coroutine.c:198:12: note: previous declaration is here static int done; ^ Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Thomas Huth Message-ID: <20231009100251.56019-11-philmd@linaro.org> Signed-off-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 a2563647e7..49d4d9b251 100644 --- a/tests/unit/test-coroutine.c +++ b/tests/unit/test-coroutine.c @@ -195,7 +195,7 @@ static void test_no_dangling_access(void) } static bool locked; -static int done; +static int done_count; static void coroutine_fn mutex_fn(void *opaque) { @@ -206,7 +206,7 @@ static void coroutine_fn mutex_fn(void *opaque) qemu_coroutine_yield(); locked = false; qemu_co_mutex_unlock(m); - done++; + done_count++; } static void coroutine_fn lockable_fn(void *opaque) @@ -218,7 +218,7 @@ static void coroutine_fn lockable_fn(void *opaque) qemu_coroutine_yield(); locked = false; qemu_lockable_unlock(x); - done++; + done_count++; } static void do_test_co_mutex(CoroutineEntry *entry, void *opaque) @@ -226,7 +226,7 @@ static void do_test_co_mutex(CoroutineEntry *entry, void *opaque) Coroutine *c1 = qemu_coroutine_create(entry, opaque); Coroutine *c2 = qemu_coroutine_create(entry, opaque); - done = 0; + done_count = 0; qemu_coroutine_enter(c1); g_assert(locked); qemu_coroutine_enter(c2); @@ -235,11 +235,11 @@ static void do_test_co_mutex(CoroutineEntry *entry, void *opaque) * terminates. */ qemu_coroutine_enter(c1); - g_assert_cmpint(done, ==, 1); + g_assert_cmpint(done_count, ==, 1); g_assert(locked); qemu_coroutine_enter(c2); - g_assert_cmpint(done, ==, 2); + g_assert_cmpint(done_count, ==, 2); g_assert(!locked); }