From patchwork Tue Sep 12 11:41:12 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Thomas Huth X-Patchwork-Id: 721763 Delivered-To: patch@linaro.org Received: by 2002:adf:f64d:0:b0:31d:da82:a3b4 with SMTP id x13csp1590530wrp; Tue, 12 Sep 2023 04:46:00 -0700 (PDT) X-Google-Smtp-Source: AGHT+IHTmyH6EuoT9zherH09E3jboXzhNEPmWmvG/9a8F+Zvza6IKmFno+Nn17pCchjobhUMFOSH X-Received: by 2002:a05:620a:2ae0:b0:76d:a89c:1e15 with SMTP id bn32-20020a05620a2ae000b0076da89c1e15mr12506896qkb.59.1694519160314; Tue, 12 Sep 2023 04:46:00 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1694519160; cv=none; d=google.com; s=arc-20160816; b=h+vcEP7XJ3zTLbmwDYGpWw6O94qXca2fqi7uKRnx5iczIz+mI2QE+l2hE/mtGCbzDK QfiH2TgW09oROcn73pjRQLJtDJvQ5UKPXOZ6c+4gjl31uqXeAIHt3N2o1bX3My9cxm4L 01MDy10pN2YbuDBPHn1y0eVyAvMsAkPnAM9XW2dMePUKLD7bP86vHJVgYDu6sP5DgpHH AREkV4cPuzlZTTT9FI8uLyWpFRmr6vzNFLRiApZTUDaunMrywfenK7QfmhNVNpWVeaIN aTppSAcqLi/28wfNo9IUsBUe5iO90KkL5C8N8ZCvstkqD75Fl9ylmcpWSfNAW3Lj5sBW E2Dg== 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=mr7QefY8NftnRTtEu7mVTao+e6HeOE+gvAqfSpU2F34=; fh=kUMFIQ2sorgZvV3vc53+XpMxI3icKpuGuj8K51WZ2KQ=; b=Yl2IELj+Yu9XpDgUvh/2pKYOvyApMRoHcJwjhGvfTPkpbnvlopLvXRhoUe/O3kxqvL wZBpWdzQKmUDmX8RZsmFbWhDpSMOA6DwVCSa5QcxICafb2DeM6SPKmvfX1aP7/41ozz9 UmP0Kz4Y7LZeaXBCP8YhezO3NkVua1KMzBHDd6RzEinE4YyazEgiZpS1IxDUpraUvb4Z gntyqR1hWLnsjg+YNR+MPPOs8pkcyhoKFJ/MrZiyoKWfVNzUIAcxZB1d3OPF8n6+M0AR 1mXUNDZzok7KjTPplca9dL1iJ9z05Wsr34D+7c/ROAVEkTDYzNzxAr4Z7T6v5ljCi7Mb /4Jg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=W2x1Tf0c; 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 ql4-20020a05620a890400b0076d81c911a3si6059310qkn.226.2023.09.12.04.46.00 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Tue, 12 Sep 2023 04:46:00 -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=W2x1Tf0c; 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 1qg1lu-0004IL-VN; Tue, 12 Sep 2023 07:41:36 -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 1qg1ln-0004Em-9D for qemu-devel@nongnu.org; Tue, 12 Sep 2023 07:41:27 -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 1qg1ll-00034p-6n for qemu-devel@nongnu.org; Tue, 12 Sep 2023 07:41:27 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1694518884; 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=mr7QefY8NftnRTtEu7mVTao+e6HeOE+gvAqfSpU2F34=; b=W2x1Tf0c9Bej0f9OnLjDT2J61ySTYhEmiq3SknL8HwQ9TfjOJIV2eD3FjPmwZNJixdhnkC bZYpHgvm2Wjc4mQeXzbkLYuR7r97Z8q617t/KrBwaWk8E4l4s/8SZsxYSrF3yXe+TgZIkb Jrkeea+w6iZw2H7L/duu030l3Aew7LU= Received: from mimecast-mx02.redhat.com (mx-ext.redhat.com [66.187.233.73]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-621-nOkhTiR7ObiSvDBlFK3Dlw-1; Tue, 12 Sep 2023 07:41:22 -0400 X-MC-Unique: nOkhTiR7ObiSvDBlFK3Dlw-1 Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.rdu2.redhat.com [10.11.54.3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 76B0B1C06EC7; Tue, 12 Sep 2023 11:41:22 +0000 (UTC) Received: from thuth-p1g4.redhat.com (unknown [10.39.192.161]) by smtp.corp.redhat.com (Postfix) with ESMTP id 8E0BC1054FC0; Tue, 12 Sep 2023 11:41:21 +0000 (UTC) From: Thomas Huth To: qemu-devel@nongnu.org Cc: Stefan Hajnoczi , =?utf-8?q?Philippe_Mathieu-Daud?= =?utf-8?q?=C3=A9?= , Peter Maydell Subject: [PULL 7/7] tests/qtest/pflash: Clean up local variable shadowing Date: Tue, 12 Sep 2023 13:41:12 +0200 Message-ID: <20230912114112.296428-8-thuth@redhat.com> In-Reply-To: <20230912114112.296428-1-thuth@redhat.com> References: <20230912114112.296428-1-thuth@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.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é Fix: tests/qtest/pflash-cfi02-test.c: In function ‘test_geometry’: tests/qtest/pflash-cfi02-test.c:409:22: warning: declaration of ‘byte_addr’ shadows a previous local [-Wshadow=compatible-local] 409 | uint64_t byte_addr = (uint64_t)i * c->sector_len[region]; | ^~~~~~~~~ tests/qtest/pflash-cfi02-test.c:342:14: note: shadowed declaration is here 342 | uint64_t byte_addr = 0; | ^~~~~~~~~ Signed-off-by: Philippe Mathieu-Daudé Message-ID: <20230904162824.85385-4-philmd@linaro.org> Reviewed-by: Peter Maydell Signed-off-by: Thomas Huth --- tests/qtest/pflash-cfi02-test.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/qtest/pflash-cfi02-test.c b/tests/qtest/pflash-cfi02-test.c index 0b52c2ca5c..8c073efcb4 100644 --- a/tests/qtest/pflash-cfi02-test.c +++ b/tests/qtest/pflash-cfi02-test.c @@ -406,7 +406,7 @@ static void test_geometry(const void *opaque) for (int region = 0; region < nb_erase_regions; ++region) { for (uint32_t i = 0; i < c->nb_blocs[region]; ++i) { - uint64_t byte_addr = (uint64_t)i * c->sector_len[region]; + byte_addr = (uint64_t)i * c->sector_len[region]; g_assert_cmphex(flash_read(c, byte_addr), ==, bank_mask(c)); } }