From d60e1f6693e52800603eac7c8de3ade14eb6a514 Mon Sep 17 00:00:00 2001 From: Pete Moore Date: Mon, 16 Dec 2024 16:55:06 +0100 Subject: [PATCH] flash/nor/sfdp: Fix broken DEBUG log line on macOS https://review.openocd.org/c/openocd/+/8439 changed variable `words` from uint8_t to unsigned int in sfdp.c but failed to update the LOG_DEBUG line to reflect the new type. On macOS this caused: src/flash/nor/sfdp.c:107:28: error: format specifies type 'unsigned char' but the argument has type 'unsigned int' [-Werror,-Wformat] The formatting of the debug line has been updated to reflect the updated type. Change-Id: Ifc7ddb1279ab2603901c969d9c09af847f3a3caf Signed-off-by: Pete Moore Reviewed-on: https://review.openocd.org/c/openocd/+/8660 Tested-by: jenkins Reviewed-by: Tomas Vanek Reviewed-by: Antonio Borneo --- src/flash/nor/sfdp.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/flash/nor/sfdp.c b/src/flash/nor/sfdp.c index 917f1626f..8e25ba680 100644 --- a/src/flash/nor/sfdp.c +++ b/src/flash/nor/sfdp.c @@ -103,7 +103,7 @@ int spi_sfdp(struct flash_bank *bank, struct flash_device *dev, uint16_t id = (((pheaders[k].ptr) >> 16) & 0xFF00) | (pheaders[k].revision & 0xFF); uint32_t ptr = pheaders[k].ptr & 0xFFFFFF; - LOG_DEBUG("pheader %d len=0x%02" PRIx8 " id=0x%04" PRIx16 + LOG_DEBUG("pheader %d len=0x%02x id=0x%04" PRIx16 " ptr=0x%06" PRIx32, k, words, id, ptr); /* retrieve parameter table */