arm/digic: replace snprintf() with g_strdup_printf()
Also fixes a GCC 12.0.1 false-positive: ../hw/arm/digic.c: In function ‘digic_init’: ../hw/arm/digic.c:45:54: error: ‘%d’ directive output may be truncated writing between 1 and 11 bytes into a region of size 5 [-Werror=format-truncation=] 45 | snprintf(name, DIGIC_TIMER_NAME_MLEN, "timer[%d]", i); | ^~ Signed-off-by:Marc-André Lureau <marcandre.lureau@redhat.com> Reviewed-by:
Peter Maydell <peter.maydell@linaro.org> Reviewed-by:
Daniel P. Berrangé <berrange@redhat.com> Message-Id: <20220420132624.2439741-14-marcandre.lureau@redhat.com>
Please register or sign in to comment