Dear SeaBIOS folks,
Building SeaBIOS master with GCC 10 from Debian Sid/unstable, the compiler shows the warning below.
``` $ make CC=gcc-10 V=1 […] Compile checking out/src/tcgbios.o gcc-10 -Iout/ -Isrc -Os -MD -g -Wall -Wno-strict-aliasing -Wold-style-definition -Wtype-limits -m32 -march=i386 -mregparm=3 -mpreferred-stack-boundary=2 -minline-all-stringops -fomit-frame-pointer -freg-struct-return -ffreestanding -fno-delete-null-pointer-checks -ffunction-sections -fdata-sections -fno-common -fno-merge-constants -fno-pie -fno-stack-protector -fstack-check=no -Wno-address-of-packed-member -DMODE16=0 -DMODESEGMENT=0 -c src/tcgbios.c -o out/src/tcgbios.o src/tcgbios.c: In function 'tpm20_write_EfiSpecIdEventStruct': src/tcgbios.c:290:30: warning: array subscript '(<unknown>) + 4294967295' is outside the bounds of an interior zero-length array 'struct TCG_EfiSpecIdEventAlgorithmSize[0]' [-Wzero-length-bounds] 290 | event.hdr.digestSizes[count].algorithmId = be16_to_cpu(sel->hashAlg); | ~~~~~~~~~~~~~~~~~~~~~^~~~~~~ In file included from src/tcgbios.c:22: src/std/tcg.h:527:7: note: while referencing 'digestSizes' 527 | } digestSizes[0]; | ^~~~~~~~~~~ src/tcgbios.c:291:30: warning: array subscript '(<unknown>) + 4294967295' is outside the bounds of an interior zero-length array 'struct TCG_EfiSpecIdEventAlgorithmSize[0]' [-Wzero-length-bounds] 291 | event.hdr.digestSizes[count].digestSize = hsize; | ~~~~~~~~~~~~~~~~~~~~~^~~~~~~ In file included from src/tcgbios.c:22: src/std/tcg.h:527:7: note: while referencing 'digestSizes' 527 | } digestSizes[0]; | ^~~~~~~~~~~ […] ```
Kind regards,
Paul