Skip to content

Commit 6eeda9e

Browse files
bonziniarichardson
authored andcommitted
pc-bios/optionrom: compile with -Wno-array-bounds
Avoids the following bogus warning: pvh_main.c: In function ‘pvh_load_kernel’: pvh_main.c:101:42: warning: array subscript 0 is outside array bounds of ‘uint16_t[0]’ {aka ‘short unsigned int[]’} [-Warray-bounds] 101 | uint32_t ebda_paddr = ((uint32_t)*((uint16_t *)EBDA_BASE_ADDR)) << 4; | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Cc: qemu-stable@nongnu.org Reviewed-by: Richard Henderson <richard.henderson@linaro.org> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> (cherry picked from commit 236d152)
1 parent 06b5d06 commit 6eeda9e

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

pc-bios/optionrom/Makefile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ override CFLAGS += $(call cc-option, -fno-pie)
2626
override CFLAGS += -ffreestanding -I$(TOPSRC_DIR)/include
2727
override CFLAGS += $(call cc-option, -fno-stack-protector)
2828
override CFLAGS += $(call cc-option, -m16)
29+
override CFLAGS += $(call cc-option, -Wno-array-bounds)
2930

3031
ifeq ($(filter -m16, $(CFLAGS)),)
3132
# Attempt to work around compilers that lack -m16 (GCC <= 4.8, clang <= ??)

0 commit comments

Comments
 (0)