This is an automated email from Gerrit.

"Pete Moore <pmo...@mozilla.com>" just uploaded a new patch set to Gerrit, 
which you can find at https://review.openocd.org/c/openocd/+/8660

-- gerrit

commit 38dd0e2949aee37ec950738638503d454f7da108
Author: Pete Moore <pmo...@mozilla.com>
Date:   Mon Dec 16 15:28:52 2024 +0100

    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. This broke the LOG_DEBUG
    formatting on macOS, causing:
    
    src/flash/nor/sfdp.c:107:28: error: format specifies type 'unsigned
    char' but the argument has type 'unsigned int' [-Werror,-Wformat]
    
    This reverts the change in type of variable `words`.
    
    Change-Id: Ifc7ddb1279ab2603901c969d9c09af847f3a3caf
    Signed-off-by: Pete Moore <pmo...@mozilla.com>

diff --git a/src/flash/nor/sfdp.c b/src/flash/nor/sfdp.c
index 917f1626fb..b411a3b639 100644
--- a/src/flash/nor/sfdp.c
+++ b/src/flash/nor/sfdp.c
@@ -99,7 +99,7 @@ int spi_sfdp(struct flash_bank *bank, struct flash_device 
*dev,
                goto err;
 
        for (k = 0; k < nph; k++) {
-               unsigned int words = (pheaders[k].revision >> 24) & 0xFF;
+               uint8_t words = (pheaders[k].revision >> 24) & 0xFF;
                uint16_t id = (((pheaders[k].ptr) >> 16) & 0xFF00) | 
(pheaders[k].revision & 0xFF);
                uint32_t ptr = pheaders[k].ptr & 0xFFFFFF;
 

-- 

Reply via email to