From 3b8bb9a9992745872167e67ea25336d565724d12 Mon Sep 17 00:00:00 2001 From: David Woodhouse Date: Sat, 27 Mar 2021 09:44:18 +0000 Subject: [PATCH] Fix Windows build warning: No %zd for size_t on Windows Signed-off-by: David Woodhouse --- po/pl.po | 4 ++-- po/sv.po | 4 ++-- po/uk.po | 4 ++-- ssl.c | 5 +++-- 4 files changed, 9 insertions(+), 8 deletions(-) diff --git a/po/pl.po b/po/pl.po index 26bc9259..314ed36b 100644 --- a/po/pl.po +++ b/po/pl.po @@ -4985,8 +4985,8 @@ msgstr "Plik %s jest pusty\n" #: ssl.c:975 #, c-format -msgid "File %s has suspicious size %zd\n" -msgstr "Plik %s ma podejrzany rozmiar %zd\n" +msgid "File %s has suspicious size %\n" +msgstr "Plik %s ma podejrzany rozmiar %\n" #: ssl.c:984 #, c-format diff --git a/po/sv.po b/po/sv.po index d211ec70..e4a68a8b 100644 --- a/po/sv.po +++ b/po/sv.po @@ -4923,8 +4923,8 @@ msgstr "Filen %s är tom\n" #: ssl.c:975 #, c-format -msgid "File %s has suspicious size %zd\n" -msgstr "Filen %s har misstänkt storlek %zd\n" +msgid "File %s has suspicious size %\n" +msgstr "Filen %s har misstänkt storlek %\n" #: ssl.c:984 #, c-format diff --git a/po/uk.po b/po/uk.po index 12aa1e59..37d034b4 100644 --- a/po/uk.po +++ b/po/uk.po @@ -5034,8 +5034,8 @@ msgstr "Файл %s є порожнім\n" #: ssl.c:975 #, c-format -msgid "File %s has suspicious size %zd\n" -msgstr "Розмір файла %s є підозріливим — %zd\n" +msgid "File %s has suspicious size %\n" +msgstr "Розмір файла %s є підозріливим — %\n" #: ssl.c:984 #, c-format diff --git a/ssl.c b/ssl.c index 3bac5216..f68e91f5 100644 --- a/ssl.c +++ b/ssl.c @@ -20,6 +20,7 @@ #include #include #include +#include #include #include #include @@ -969,8 +970,8 @@ ssize_t openconnect_read_file(struct openconnect_info *vpninfo, const char *fnam return -ENOENT; } if (st.st_size >= INT_MAX || st.st_size < 0) { - vpn_progress(vpninfo, PRG_INFO, _("File %s has suspicious size %zd\n"), - vpninfo->xmlconfig, (ssize_t)st.st_size); + vpn_progress(vpninfo, PRG_INFO, _("File %s has suspicious size %" PRId64 "\n"), + vpninfo->xmlconfig, (int64_t)st.st_size); close(fd); return -EIO; } -- 2.49.0