On Thu, 16 Oct 2025 at 13:48, Jan Kiszka <[email protected]> wrote: > > From: Jan Kiszka <[email protected]> > > Resolves this build breakage (which is actually a false-positive) > > ../hw/openrisc/openrisc_sim.c: In function ‘openrisc_sim_init’: > ../hw/openrisc/openrisc_sim.c:284:45: error: ‘__builtin___snprintf_chk’ > output may be truncated before the last format character > [-Werror=format-truncation=] > snprintf(alias, sizeof(alias), "serial%d", uart_idx); > ^ > In file included from /usr/include/stdio.h:964:0, > from /data/qemu/include/qemu/osdep.h:114, > from ../hw/openrisc/openrisc_sim.c:21: > /usr/include/bits/stdio2.h:54:10: note: ‘__builtin___snprintf_chk’ output > between 8 and 9 bytes into a destination of size 8 > return __builtin___snprintf_chk (__s, __n, __USE_FORTIFY_LEVEL - 1, > ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ > __glibc_objsize (__s), __fmt, > ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ > __va_arg_pack ()); > ~~~~~~~~~~~~~~~~~ > > by using a modern, more robust allocation pattern. > > Suggested-by: Peter Maydell <[email protected]> > Signed-off-by: Jan Kiszka <[email protected]> > --- >
Reviewed-by: Peter Maydell <[email protected]> thanks -- PMM
