From 868e762d71695f0a45f593c83215aeb428e475b3 Mon Sep 17 00:00:00 2001 From: Romain Vimont Date: Sat, 14 Nov 2020 22:08:59 +0100 Subject: [PATCH] Fix size_t format specifier for Windows MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Use "%Iu" on Windows. This fixes the following warning: ../app/src/sys/win/command.c:17:14: warning: unknown conversion type character ā€˜lā€™ in format [-Wformat=] 17 | LOGE("Command too long (%" PRIsizet " chars)", len - 1); --- app/src/command.h | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/app/src/command.h b/app/src/command.h index 28f9fbcf..7035139b 100644 --- a/app/src/command.h +++ b/app/src/command.h @@ -12,11 +12,7 @@ # define PATH_SEPARATOR '\\' # define PRIexitcode "lu" // -# ifdef _WIN64 -# define PRIsizet PRIu64 -# else -# define PRIsizet PRIu32 -# endif +# define PRIsizet "Iu" # define PROCESS_NONE NULL # define NO_EXIT_CODE -1u // max value as unsigned typedef HANDLE process_t;