From 6db57051d070fc8d6bb54d21413e5e8610972651 Mon Sep 17 00:00:00 2001 From: Erhan Kurubas Date: Sun, 21 Aug 2022 21:57:32 +0300 Subject: [PATCH] flash/nor/kinetis: fix clang scan-build error format-truncation kinetis.c:994:61: error: '%u' directive output may be truncated writing between 1 and 10 bytes into a region of size 4 [-Werror=format-truncation=] tested with scan-build-14 Signed-off-by: Erhan Kurubas Change-Id: I72d141a3f8e19ca3596beee2be8434fc8492946f Reviewed-on: https://review.openocd.org/c/openocd/+/7140 Reviewed-by: Tomas Vanek Reviewed-by: Antonio Borneo Tested-by: jenkins --- src/flash/nor/kinetis.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/flash/nor/kinetis.c b/src/flash/nor/kinetis.c index 61e7b17ab..239cf4164 100644 --- a/src/flash/nor/kinetis.c +++ b/src/flash/nor/kinetis.c @@ -948,7 +948,7 @@ static int kinetis_create_missing_banks(struct kinetis_chip *k_chip) unsigned num_blocks; struct kinetis_flash_bank *k_bank; struct flash_bank *bank; - char base_name[69], name[80], num[4]; + char base_name[69], name[87], num[11]; char *class, *p; num_blocks = k_chip->num_pflash_blocks + k_chip->num_nvm_blocks;