Skip to content

Commit

Permalink
hw/microblaze: Clean up local variable shadowing
Browse files Browse the repository at this point in the history
Fix:

  hw/microblaze/petalogix_ml605_mmu.c: In function ‘petalogix_ml605_init’:
  hw/microblaze/petalogix_ml605_mmu.c:186:24: warning: declaration of ‘dinfo’ shadows a previous local [-Wshadow=compatible-local]
    186 |             DriveInfo *dinfo = drive_get(IF_MTD, 0, i);
        |                        ^~~~~
  hw/microblaze/petalogix_ml605_mmu.c:78:16: note: shadowed declaration is here
     78 |     DriveInfo *dinfo;
        |                ^~~~~

Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Message-ID: <20230904161235.84651-14-philmd@linaro.org>
Signed-off-by: Markus Armbruster <armbru@redhat.com>
  • Loading branch information
philmd authored and Markus Armbruster committed Sep 29, 2023
1 parent 5f87ddd commit 4705c8e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion hw/microblaze/petalogix_ml605_mmu.c
Original file line number Diff line number Diff line change
Expand Up @@ -183,7 +183,7 @@ petalogix_ml605_init(MachineState *machine)
spi = (SSIBus *)qdev_get_child_bus(dev, "spi");

for (i = 0; i < NUM_SPI_FLASHES; i++) {
DriveInfo *dinfo = drive_get(IF_MTD, 0, i);
dinfo = drive_get(IF_MTD, 0, i);
qemu_irq cs_line;

dev = qdev_new("n25q128");
Expand Down

0 comments on commit 4705c8e

Please sign in to comment.