This is an automated email from Gerrit.

"zapb <[email protected]>" just uploaded a new patch set to Gerrit, which you can 
find at https://review.openocd.org/c/openocd/+/9728

-- gerrit

commit 01b0428db8f2dfd6ec05339cd2a1139db57f1c6f
Author: Marc Schink <[email protected]>
Date:   Wed Jun 3 16:04:43 2026 +0200

    flash/nor/tcl: Remove unused variable
    
    Remove the unused variable. This additionally fixes the following build
    issue:
    
    ../src/flash/nor/tcl.c: In function 'handle_flash_banks_command':
    ../src/flash/nor/tcl.c:1445:22: error: variable 'n' set but not used 
[-Werror=unused-but-set-variable=]
     1445 |         unsigned int n = 0;
          |
    
    Tested with GCC 16.1.1
    
    Change-Id: Id033101f9caf51f87622e872234b8520bf31d9f0
    Signed-off-by: Marc Schink <[email protected]>

diff --git a/src/flash/nor/tcl.c b/src/flash/nor/tcl.c
index bbf8a4fb05..57e53dca1e 100644
--- a/src/flash/nor/tcl.c
+++ b/src/flash/nor/tcl.c
@@ -1442,8 +1442,7 @@ COMMAND_HANDLER(handle_flash_banks_command)
        if (CMD_ARGC != 0)
                return ERROR_COMMAND_SYNTAX_ERROR;
 
-       unsigned int n = 0;
-       for (struct flash_bank *p = flash_bank_list(); p; p = p->next, n++) {
+       for (struct flash_bank *p = flash_bank_list(); p; p = p->next) {
                command_print(CMD, "#%d : %s (%s) at " TARGET_ADDR_FMT ", size 
0x%8.8" PRIx32 ", "
                        "buswidth %u, chipwidth %u", p->bank_number,
                        p->name, p->driver->name, p->base, p->size,

-- 

Reply via email to