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 <erhan.kurubas@espressif.com>
Change-Id: I72d141a3f8e19ca3596beee2be8434fc8492946f
Reviewed-on: https://review.openocd.org/c/openocd/+/7140
Reviewed-by: Tomas Vanek <vanekt@fbl.cz>
Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>
Tested-by: jenkins
This commit is contained in:
Erhan Kurubas 2022-08-21 21:57:32 +03:00 committed by Tomas Vanek
parent a527112dae
commit 6db57051d0
1 changed files with 1 additions and 1 deletions

View File

@ -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;