
22 Oct
2022
22 Oct
'22
12:37 a.m.
On Thu, Oct 13, 2022 at 10:16:56AM +0200, Michal Suchanek wrote:
In file included from ../tools/imagetool.h:24, from ../tools/default_image.c:16: In function ‘image_set_name’, inlined from ‘image_set_header’ at ../tools/default_image.c:133:2: ../include/image.h:786:9: warning: ‘strncpy’ specified bound 32 equals destination size [-Wstringop-truncation] 786 | strncpy(image_get_name(hdr), name, IH_NMLEN); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Signed-off-by: Michal Suchanek msuchanek@suse.de Reviewed-by: Simon Glass sjg@chromium.org
Changes in v2: Use __nonstring instead of suppressing the warning
This breaks a ton of boards such as crs305-1g-4s in tools/kwbimage.h.
--
Tom