Attention is currently required from: Nico Huber, Paul Menzel, Julius Werner. Angel Pons has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/62830 )
Change subject: commonlib: endian: Qualify variable as volatile ......................................................................
Patch Set 1:
(1 comment)
Commit Message:
https://review.coreboot.org/c/coreboot/+/62830/comment/b386a9c7_03846be3 PS1, Line 9: ``` : $ make V=1 # emulation/qemu-i440fx : […] : CC ramstage/arch/x86/ebda.o : x86_64-linux-gnu-gcc-12 -MMD -Isrc -Isrc/include -Isrc/commonlib/include -Isrc/commonlib/bsd/include -Ibuild -I3rdparty/vboot/firmware/include -include src/include/kconfig.h -include src/include/rules.h -include src/commonlib/bsd/include/commonlib/bsd/compiler.h -I3rdparty -D__BUILD_DIR__="build" -Isrc/arch/x86/include -D__ARCH_x86_32__ -pipe -g -nostdinc -std=gnu11 -nostdlib -Wall -Wundef -Wstrict-prototypes -Wmissing-prototypes -Wwrite-strings -Wredundant-decls -Wno-trigraphs -Wimplicit-fallthrough -Wshadow -Wdate-time -Wtype-limits -Wvla -Wdangling-else -fno-common -ffreestanding -fno-builtin -fomit-frame-pointer -fstrict-aliasing -ffunction-sections -fdata-sections -fno-pie -Wno-packed-not-aligned -fconserve-stack -Wnull-dereference -Wreturn-type -Wlogical-op -Wduplicated-cond -Wno-unused-but-set-variable -Werror -Os -Wno-address-of-packed-member -m32 -Wl,-b,elf32-i386 -Wl,-melf_i386 -m32 -fuse-ld=bfd -fno-stack-protector -Wl,--build-id=none -fno-delete-null-pointer-checks -Wlogical-op -march=i686 -mno-mmx -MT build/ramstage/arch/x86/ebda.o -D__RAMSTAGE__ -c -o build/ramstage/arch/x86/ebda.o src/arch/x86/ebda.c : In file included from src/arch/x86/ebda.c:6: : In function 'write_ble8', : inlined from 'write_le8' at src/commonlib/include/commonlib/endian.h:155:2, : inlined from 'write_le16' at src/commonlib/include/commonlib/endian.h:178:2, : inlined from 'setup_ebda' at src/arch/x86/ebda.c:35:2, : inlined from 'setup_default_ebda' at src/arch/x86/ebda.c:48:2: : src/commonlib/include/commonlib/endian.h:27:26: error: array subscript 0 is outside array bounds of 'void[0]' [-Werror=array-bounds] : 27 | *(uint8_t *)dest = val; : | ~~~~~~~~~~~~~~~~~^~~~~ : In function 'write_ble8', : inlined from 'write_at_ble8' at src/commonlib/include/commonlib/endian.h:34:2, : inlined from 'write_at_le8' at src/commonlib/include/commonlib/endian.h:160:2, : inlined from 'write_le16' at src/commonlib/include/commonlib/endian.h:179:2, : inlined from 'setup_ebda' at src/arch/x86/ebda.c:35:2, : inlined from 'setup_default_ebda' at src/arch/x86/ebda.c:48:2: : src/commonlib/include/commonlib/endian.h:27:26: error: array subscript 1 is outside array bounds of 'void[0]' [-Werror=array-bounds] : 27 | *(uint8_t *)dest = val; : | ~~~~~~~~~~~~~~~~~^~~~~ : In function 'write_ble8', : inlined from 'write_le8' at src/commonlib/include/commonlib/endian.h:155:2, : inlined from 'write_le16' at src/commonlib/include/commonlib/endian.h:178:2, : inlined from 'setup_ebda' at src/arch/x86/ebda.c:36:2, : inlined from 'setup_default_ebda' at src/arch/x86/ebda.c:48:2: : src/commonlib/include/commonlib/endian.h:27:26: error: array subscript 0 is outside array bounds of 'void[0]' [-Werror=array-bounds] : 27 | *(uint8_t *)dest = val; : | ~~~~~~~~~~~~~~~~~^~~~~ : In function 'write_ble8', : inlined from 'write_at_ble8' at src/commonlib/include/commonlib/endian.h:34:2, : inlined from 'write_at_le8' at src/commonlib/include/commonlib/endian.h:160:2, : inlined from 'write_le16' at src/commonlib/include/commonlib/endian.h:179:2, : inlined from 'setup_ebda' at src/arch/x86/ebda.c:36:2, : inlined from 'setup_default_ebda' at src/arch/x86/ebda.c:48:2: : src/commonlib/include/commonlib/endian.h:27:26: error: array subscript 1 is outside array bounds of 'void[0]' [-Werror=array-bounds] : 27 | *(uint8_t *)dest = val; : | ~~~~~~~~~~~~~~~~~^~~~~ : In function 'write_ble8', : inlined from 'write_le8' at src/commonlib/include/commonlib/endian.h:155:2, : inlined from 'write_le16' at src/commonlib/include/commonlib/endian.h:178:2, : inlined from 'setup_ebda' at src/arch/x86/ebda.c:40:2, : inlined from 'setup_default_ebda' at src/arch/x86/ebda.c:48:2: : src/commonlib/include/commonlib/endian.h:27:26: error: array subscript 0 is outside array bounds of 'void[0]' [-Werror=array-bounds] : 27 | *(uint8_t *)dest = val; : | ~~~~~~~~~~~~~~~~~^~~~~ : In function 'write_ble8', : inlined from 'write_at_ble8' at src/commonlib/include/commonlib/endian.h:34:2, : inlined from 'write_at_le8' at src/commonlib/include/commonlib/endian.h:160:2, : inlined from 'write_le16' at src/commonlib/include/commonlib/endian.h:179:2, : inlined from 'setup_ebda' at src/arch/x86/ebda.c:40:2, : inlined from 'setup_default_ebda' at src/arch/x86/ebda.c:48:2: : src/commonlib/include/commonlib/endian.h:27:26: error: array subscript 1 is outside array bounds of 'void[0]' [-Werror=array-bounds] : 27 | *(uint8_t *)dest = val; : | ~~~~~~~~~~~~~~~~~^~~~~ : cc1: all warnings being treated as errors : ``` Could you please replace the compiler spam with a more understandable commit message?
Also, does anyone think this warning makes any sense? I don't understand what it's complaining about.