From 7783223a912417d459bc7939bd93c1fe4e086ba8 Mon Sep 17 00:00:00 2001 From: Marko Lindqvist Date: Thu, 9 Dec 2021 01:52:30 +0200 Subject: [PATCH 43/43] Cast zstd error value to match printf format specifier used There's no single printf format specifier that would match the type in all environments. "%zu" would be the one with compilers that support it, but not all compilers we use do (notably it does not work on msys2) See osdn #43355 Signed-off-by: Marko Lindqvist --- utility/ioz.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/utility/ioz.c b/utility/ioz.c index f8ae14eaf0..c75cda3154 100644 --- a/utility/ioz.c +++ b/utility/ioz.c @@ -1218,10 +1218,10 @@ const char *fz_strerror(fz_FILE *fp) if (NULL != cleartext) { fc_snprintf(zstderror, sizeof(zstderror), "ZSTD: \"%s\" (%ld)", - cleartext, fp->u.zstd.error); + cleartext, (long)fp->u.zstd.error); } else { fc_snprintf(zstderror, sizeof(zstderror), "ZSTD error %ld", - fp->u.zstd.error); + (long)fp->u.zstd.error); } return zstderror; } -- 2.33.0