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 <borneo.antonio@gmail.com>
Reviewed-on: https://review.openocd.org/c/openocd/+/9401
Reviewed-by: R. Diez <rdiez-2006@rd10.de>
Tested-by: jenkins
This commit is contained in:
Antonio Borneo
2026-01-25 11:02:02 +01:00
parent 95bd9093b1
commit 92b482af50
+2 -2
View File
@@ -47,7 +47,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)
@@ -110,7 +110,7 @@ static void log_puts(enum log_levels level,
#error "Configuration error: Neither mallinfo() nor mallinfo2() are available."
#endif
#endif
fprintf(log_output, "%s%d %" PRId64 " %s:%d %s()"
fprintf(log_output, "%s%u %" PRId64 " %s:%d %s()"
#ifdef _DEBUG_FREE_SPACE_
#ifdef HAVE_MALLINFO2
" %zu"