]> www.infradead.org Git - users/dwmw2/openconnect.git/commitdiff
Fix Windows build warning: No %zd for size_t on Windows
authorDavid Woodhouse <dwmw2@infradead.org>
Sat, 27 Mar 2021 09:44:18 +0000 (09:44 +0000)
committerDavid Woodhouse <dwmw2@infradead.org>
Sat, 27 Mar 2021 10:04:20 +0000 (10:04 +0000)
Signed-off-by: David Woodhouse <dwmw2@infradead.org>
po/pl.po
po/sv.po
po/uk.po
ssl.c

index 26bc9259315d2c21ef65421deb76f0d413ab03b0..314ed36bd3ad57d7b31f7918b6e4bf45483d746a 100644 (file)
--- 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 %<PRId64>\n"
+msgstr "Plik %s ma podejrzany rozmiar %<PRId64>\n"
 
 #: ssl.c:984
 #, c-format
index d211ec70952ba4b5fb80e35d41d4077c18e64100..e4a68a8b888c4333175627fdaf71b4af12809bdf 100644 (file)
--- 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 %<PRId64>\n"
+msgstr "Filen %s har misstänkt storlek %<PRId64>\n"
 
 #: ssl.c:984
 #, c-format
index 12aa1e59716e1fedacaa91dd8415b5579f98a7cf..37d034b479a4d9f45aadb3cbd0ea30ac814a1e4b 100644 (file)
--- 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 %<PRId64>\n"
+msgstr "Розмір файла %s є підозріливим — %<PRId64>\n"
 
 #: ssl.c:984
 #, c-format
diff --git a/ssl.c b/ssl.c
index 3bac52163caf4ea609c5a073bc7256d09ecf31b3..f68e91f5bcbe83bc7569901690ff8b3e5154c57e 100644 (file)
--- a/ssl.c
+++ b/ssl.c
@@ -20,6 +20,7 @@
 #include <sys/types.h>
 #include <sys/stat.h>
 #include <unistd.h>
+#include <inttypes.h>
 #include <fcntl.h>
 #include <string.h>
 #include <stdio.h>
@@ -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;
        }