This is an automated email from Gerrit.

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

-- gerrit

commit 1f7e586f6c1a137a5f94ed39b72651030e528e62
Author: Antonio Borneo <[email protected]>
Date:   Sun Jan 25 11:02:02 2026 +0100

    log: change line counter to unsigned
    
    The incremental counter of logged lines is a signed int.
    
    Change it to unsigned, since negative values has no sense in this
    context.
    
    Change-Id: Ia75f9ca038bba385c5f88fb9fa368faaf055f9a3
    Signed-off-by: Antonio Borneo <[email protected]>

diff --git a/src/helper/log.c b/src/helper/log.c
index a157b78b18..fefed1df48 100644
--- a/src/helper/log.c
+++ b/src/helper/log.c
@@ -63,7 +63,7 @@ static const char * const log_strings[7] = {
        "Debug: ",  /* corresponds to LOG_LVL_DEBUG_USB */
 };
 
-static int count;
+static unsigned int count;
 
 /* forward the log to the listeners */
 static void log_forward(const char *file, unsigned int line, const char 
*function, const char *string)
@@ -120,7 +120,7 @@ static void log_puts(enum log_levels level,
 #ifdef _DEBUG_FREE_SPACE_
                struct mallinfo2 info = mallinfo2();
 #endif
-               fprintf(log_output, "%s%d %" PRId64 " %s:%d %s()"
+               fprintf(log_output, "%s%u %" PRId64 " %s:%d %s()"
 #ifdef _DEBUG_FREE_SPACE_
                        FORDBLKS_FORMAT
 #endif

-- 

Reply via email to