From: Thomas Huth <thuth@redhat.com>
To: qemu-devel@nongnu.org
Cc: "Stefan Hajnoczi" <stefanha@redhat.com>,
"Philippe Mathieu-Daudé" <philmd@linaro.org>,
"Peter Maydell" <peter.maydell@linaro.org>
Subject: [PULL 7/7] tests/qtest/pflash: Clean up local variable shadowing
Date: Tue, 12 Sep 2023 13:41:12 +0200 [thread overview]
Message-ID: <20230912114112.296428-8-thuth@redhat.com> (raw)
In-Reply-To: <20230912114112.296428-1-thuth@redhat.com>
From: Philippe Mathieu-Daudé <philmd@linaro.org>
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é <philmd@linaro.org>
Message-ID: <20230904162824.85385-4-philmd@linaro.org>
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Thomas Huth <thuth@redhat.com>
---
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));
}
}
--
2.41.0
prev parent reply other threads:[~2023-09-12 11:46 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-09-12 11:41 [PULL 0/7] s390x (and one qtest) patches Thomas Huth
2023-09-12 11:41 ` [PULL 1/7] s390x/ap: fix missing subsystem reset registration Thomas Huth
2023-09-12 11:41 ` [PULL 2/7] s390x: do a subsystem reset before the unprotect on reboot Thomas Huth
2024-01-10 18:30 ` Cédric Le Goater
2024-01-10 20:28 ` Matthew Rosato
2024-01-11 9:43 ` Cédric Le Goater
2024-01-11 10:18 ` Christian Borntraeger
2024-01-11 15:26 ` Matthew Rosato
2024-01-11 15:00 ` Janosch Frank
2024-01-11 15:27 ` Matthew Rosato
2023-09-12 11:41 ` [PULL 3/7] linux-headers: Update to Linux v6.6-rc1 Thomas Huth
2023-09-12 11:41 ` [PULL 4/7] target/s390x/kvm: Refactor AP functionalities Thomas Huth
2023-09-12 11:41 ` [PULL 5/7] target/s390x: AP-passthrough for PV guests Thomas Huth
2023-09-12 11:41 ` [PULL 6/7] kconfig: Add NVME to s390x machines Thomas Huth
2023-09-12 11:41 ` Thomas Huth [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20230912114112.296428-8-thuth@redhat.com \
--to=thuth@redhat.com \
--cc=peter.maydell@linaro.org \
--cc=philmd@linaro.org \
--cc=qemu-devel@nongnu.org \
--cc=stefanha@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).