[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH 13/41] arm/digic: replace snprintf() with g_strdup_printf()
From: |
Daniel P . Berrangé |
Subject: |
Re: [PATCH 13/41] arm/digic: replace snprintf() with g_strdup_printf() |
Date: |
Wed, 20 Apr 2022 16:17:17 +0100 |
User-agent: |
Mutt/2.1.5 (2021-12-30) |
On Wed, Apr 20, 2022 at 05:25:56PM +0400, marcandre.lureau@redhat.com wrote:
> From: Marc-André Lureau <marcandre.lureau@redhat.com>
>
> 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>
> ---
> hw/arm/digic.c | 5 +----
> 1 file changed, 1 insertion(+), 4 deletions(-)
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
With regards,
Daniel
--
|: https://berrange.com -o- https://www.flickr.com/photos/dberrange :|
|: https://libvirt.org -o- https://fstop138.berrange.com :|
|: https://entangle-photo.org -o- https://www.instagram.com/dberrange :|