[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PULL 41/60] hw/loader: Clean up global variable shadowing in rom_add_fi
From: |
Philippe Mathieu-Daudé |
Subject: |
[PULL 41/60] hw/loader: Clean up global variable shadowing in rom_add_file() |
Date: |
Mon, 6 Nov 2023 12:03:13 +0100 |
Fix:
hw/core/loader.c:1073:27: error: declaration shadows a variable in the global
scope [-Werror,-Wshadow]
bool option_rom, MemoryRegion *mr,
^
include/sysemu/sysemu.h:57:22: note: previous declaration is here
extern QEMUOptionRom option_rom[MAX_OPTION_ROMS];
^
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Reviewed-by: Ani Sinha <anisinha@redhat.com>
Message-Id: <20231010115048.11856-3-philmd@linaro.org>
---
include/hw/loader.h | 2 +-
hw/core/loader.c | 4 ++--
2 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/include/hw/loader.h b/include/hw/loader.h
index c4c14170ea..8685e27334 100644
--- a/include/hw/loader.h
+++ b/include/hw/loader.h
@@ -272,7 +272,7 @@ void pstrcpy_targphys(const char *name,
ssize_t rom_add_file(const char *file, const char *fw_dir,
hwaddr addr, int32_t bootindex,
- bool option_rom, MemoryRegion *mr, AddressSpace *as);
+ bool has_option_rom, MemoryRegion *mr, AddressSpace *as);
MemoryRegion *rom_add_blob(const char *name, const void *blob, size_t len,
size_t max_len, hwaddr addr,
const char *fw_file_name,
diff --git a/hw/core/loader.c b/hw/core/loader.c
index 4dd5a71fb7..7f0cbfb214 100644
--- a/hw/core/loader.c
+++ b/hw/core/loader.c
@@ -1070,7 +1070,7 @@ static void *rom_set_mr(Rom *rom, Object *owner, const
char *name, bool ro)
ssize_t rom_add_file(const char *file, const char *fw_dir,
hwaddr addr, int32_t bootindex,
- bool option_rom, MemoryRegion *mr,
+ bool has_option_rom, MemoryRegion *mr,
AddressSpace *as)
{
MachineClass *mc = MACHINE_GET_CLASS(qdev_get_machine());
@@ -1139,7 +1139,7 @@ ssize_t rom_add_file(const char *file, const char *fw_dir,
basename);
snprintf(devpath, sizeof(devpath), "/rom@%s", fw_file_name);
- if ((!option_rom || mc->option_rom_has_mr) && mc->rom_file_has_mr) {
+ if ((!has_option_rom || mc->option_rom_has_mr) && mc->rom_file_has_mr)
{
data = rom_set_mr(rom, OBJECT(fw_cfg), devpath, true);
} else {
data = rom->data;
--
2.41.0
- [PULL 30/60] target/mips: Fix MSA BZ/BNZ opcodes displacement, (continued)
- [PULL 30/60] target/mips: Fix MSA BZ/BNZ opcodes displacement, Philippe Mathieu-Daudé, 2023/11/06
- [PULL 32/60] sysemu/kvm: Restrict kvmppc_get_radix_page_info() to ppc targets, Philippe Mathieu-Daudé, 2023/11/06
- [PULL 33/60] hw/ppc/e500: Restrict ppce500_init_mpic_kvm() to KVM, Philippe Mathieu-Daudé, 2023/11/06
- [PULL 34/60] target/ppc: Restrict KVM objects to system emulation, Philippe Mathieu-Daudé, 2023/11/06
- [PULL 35/60] target/ppc: Prohibit target specific KVM prototypes on user emulation, Philippe Mathieu-Daudé, 2023/11/06
- [PULL 36/60] target/nios2: Create IRQs *after* accelerator vCPU is realized, Philippe Mathieu-Daudé, 2023/11/06
- [PULL 37/60] target/alpha: Tidy up alpha_cpu_class_by_name(), Philippe Mathieu-Daudé, 2023/11/06
- [PULL 38/60] hw/cpu: Call object_class_is_abstract() once in cpu_class_by_name(), Philippe Mathieu-Daudé, 2023/11/06
- [PULL 39/60] exec/cpu: Have cpu_exec_realize() return a boolean, Philippe Mathieu-Daudé, 2023/11/06
- [PULL 40/60] hw/cpu: Clean up global variable shadowing, Philippe Mathieu-Daudé, 2023/11/06
- [PULL 41/60] hw/loader: Clean up global variable shadowing in rom_add_file(),
Philippe Mathieu-Daudé <=
- [PULL 44/60] tests/unit: Rename test-x86-cpuid.c to test-x86-topo.c, Philippe Mathieu-Daudé, 2023/11/06
- [PULL 42/60] hw/isa/i82378: Propagate error if PC_SPEAKER device creation failed, Philippe Mathieu-Daudé, 2023/11/06
- [PULL 43/60] hw/i386: Fix comment style in topology.h, Philippe Mathieu-Daudé, 2023/11/06
- [PULL 45/60] system/cpus: Fix CPUState.nr_cores' calculation, Philippe Mathieu-Daudé, 2023/11/06
- [PULL 46/60] hw/cpu: Update the comments of nr_cores and nr_dies, Philippe Mathieu-Daudé, 2023/11/06
- [PULL 47/60] hw/ide: reset: cancel async DMA operation before resetting state, Philippe Mathieu-Daudé, 2023/11/06
- [PULL 48/60] tests/qtest: ahci-test: add test exposing reset issue with pending callback, Philippe Mathieu-Daudé, 2023/11/06
- [PULL 49/60] hw/i2c: pmbus add support for block receive, Philippe Mathieu-Daudé, 2023/11/06
- [PULL 50/60] hw/i2c: pmbus: add vout mode bitfields, Philippe Mathieu-Daudé, 2023/11/06
- [PULL 51/60] hw/i2c: pmbus: add fan support, Philippe Mathieu-Daudé, 2023/11/06