Skip to content

Commit 82fdcd3

Browse files
philmdhuth
authored andcommitted
tests/qtest/pflash: Clean up local variable shadowing
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é <[email protected]> Message-ID: <[email protected]> Reviewed-by: Peter Maydell <[email protected]> Signed-off-by: Thomas Huth <[email protected]>
1 parent 4ddf772 commit 82fdcd3

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

tests/qtest/pflash-cfi02-test.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -406,7 +406,7 @@ static void test_geometry(const void *opaque)
406406

407407
for (int region = 0; region < nb_erase_regions; ++region) {
408408
for (uint32_t i = 0; i < c->nb_blocs[region]; ++i) {
409-
uint64_t byte_addr = (uint64_t)i * c->sector_len[region];
409+
byte_addr = (uint64_t)i * c->sector_len[region];
410410
g_assert_cmphex(flash_read(c, byte_addr), ==, bank_mask(c));
411411
}
412412
}

0 commit comments

Comments
 (0)