I have been building with an upcoming release of GCC and this may affect some people. Just getting it out there as eventually we will be at GCC 13 or later.
src/libm/math/kf_rem_pio2.c
src/libm/math/kf_rem_pio2.c: In function '__kernel_rem_pio2f':
src/libm/math/kf_rem_pio2.c:186:24: error: 'fq' may be used uninitialized [-Werror=maybe-uninitialized]
186 | fw = fq[0]-fw;
| ~~^~~
src/libm/math/kf_rem_pio2.c:63:26: note: 'fq' declared here
63 | float z,fw,f[20],fq[20],q[20];
| ^~
cc1: all warnings being treated as errors
In file included from ../../../code/software/libs/build/include/stdio.h:20,
from memcheck.c:16:
In function 'show_banner',
inlined from 'main' at memcheck.c:400:3:
../../../code/software/libs/build/include/printf.h:59:16: error: array subscript 0 is outside array bounds of 'uint32_t[0]' {aka 'long unsigned int[]'} [-Werror=array-bounds=]
59 | #define printf printf_
memcheck.c:346:5: note: in expansion of macro 'printf'
346 | printf("* Firmware reports %8ld bytes total contiguous memory *\n", *FW_MEMSIZE);
| ^~~~~~
In function 'main':
cc1: note: source object is likely at address zero
cc1: all warnings being treated as errors
Edit memcheck/Makefile CFLAGS -Wno-array-bounds
updateflash.c
updateflash.c: In function 'main':
updateflash.c:214:25: error: array subscript 256 is outside array bounds of 'void[4]' [-Werror=array-bounds=]
214 | if (version_info->major != 0) {
| ^~
updateflash.c:29:14: note: at offset 1024 into object '_end' of size 4
29 | extern void *_end;
| ^~~~
updateflash.c:218:33: error: array subscript 256 is outside array bounds of 'void[4]' [-Werror=array-bounds=]
218 | version_info->is_extdata ? "Required" : "Not required");
| ^~
updateflash.c:29:14: note: at offset 1024 into object '_end' of size 4
29 | extern void *_end;
| ^~~~
updateflash.c:216:54: error: array subscript 256 is outside array bounds of 'void[4]' [-Werror=array-bounds=]
216 | version_info->major, version_info->minor,
| ^~
updateflash.c:29:14: note: at offset 1024 into object '_end' of size 4
29 | extern void *_end;
| ^~~~
updateflash.c:220:29: error: array subscript 256 is outside array bounds of 'void[4]' [-Werror=array-bounds=]
220 | if (version_info->is_huge) {
| ^~
updateflash.c:29:14: note: at offset 1024 into object '_end' of size 4
29 | extern void *_end;
| ^~~~
cc1: all warnings being treated as errors
I have been building with an upcoming release of GCC and this may affect some people. Just getting it out there as eventually we will be at GCC 13 or later.
Edit
libs/Makefile FLAGS -Wno-error=maybe-uninitialized
memcheck.c
Edit
memcheck/Makefile CFLAGS -Wno-array-bounds
updateflash.c
Edit
updateflash/Makefile CFLAGS -Wno-array-bounds