Fix size_t format specifier for Windows

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);
This commit is contained in:
Romain Vimont 2020-11-14 22:08:59 +01:00
parent 576814bcec
commit 868e762d71

View file

@ -12,11 +12,7 @@
# define PATH_SEPARATOR '\\' # define PATH_SEPARATOR '\\'
# define PRIexitcode "lu" # define PRIexitcode "lu"
// <https://stackoverflow.com/a/44383330/1987178> // <https://stackoverflow.com/a/44383330/1987178>
# ifdef _WIN64 # define PRIsizet "Iu"
# define PRIsizet PRIu64
# else
# define PRIsizet PRIu32
# endif
# define PROCESS_NONE NULL # define PROCESS_NONE NULL
# define NO_EXIT_CODE -1u // max value as unsigned # define NO_EXIT_CODE -1u // max value as unsigned
typedef HANDLE process_t; typedef HANDLE process_t;