This is an automated email from Gerrit. "Marc Schink <[email protected]>" just uploaded a new patch set to Gerrit, which you can find at https://review.openocd.org/c/openocd/+/9479
-- gerrit commit 240ad80f3e80a92eb78a72f40271669b721533bd Author: Marc Schink <[email protected]> Date: Thu Feb 26 15:48:43 2026 +0100 helper/log: Fix build issue on MSYS2 and Cygwin On MSYS2 (native) and Cygwin, the mallinfo struct uses 'size_t' instead of 'int', which leads to a compile-time error with the current code. Update the preprocessor logic so that Cygwin and MSYS2 builds use the 'size_t' format specifier. Checkpatch-ignore: COMMIT_LOG_LONG_LINE Build error on Cygwin: ../src/helper/log.c: In function ‘log_puts’: ../src/helper/log.c:115:45: error: format ‘%d’ expects argument of type ‘int’, but argument 9 has type ‘size_t’ {aka ‘long unsigned int’} [-Werror=format=] 115 | fprintf(log_output, "%s%u %" PRId64 " %s:%d %s()" | ^~~~~~~~ ...... 122 | info.fordblks, | ~~~~~~~~~~~~~ | | | size_t {aka long unsigned int} Change-Id: I18d772facba6426ab627fb45a6d50bfc19ec9c05 Signed-off-by: Marc Schink <[email protected]> diff --git a/src/helper/log.c b/src/helper/log.c index b2663b9ccf..16e8f10889 100644 --- a/src/helper/log.c +++ b/src/helper/log.c @@ -113,7 +113,7 @@ static void log_puts(enum log_levels level, #endif fprintf(log_output, "%s%u %" PRId64 " %s:%d %s()" -#ifdef HAVE_MALLINFO2 +#if defined(HAVE_MALLINFO2) || IS_CYGWIN " %zu" #else " %d" --
