]> git.ipfire.org Git - thirdparty/openvpn.git/commit
Avoid format specifier %zu for Windows compatibility
authorSelva Nair <selva.nair@gmail.com>
Thu, 11 Aug 2016 22:58:29 +0000 (18:58 -0400)
committerDavid Sommerseth <davids@openvpn.net>
Fri, 12 Aug 2016 15:23:34 +0000 (17:23 +0200)
commitd1bd37fd508ee0462daa21011e781198964be921
treedf829c6c4c31bcc51f39ad8b61c2e59f4dee3029
parentdea8917a032e2303b39cce23e60f2348516d5a12
Avoid format specifier %zu for Windows compatibility

- Replace %zu by %u and cast the size_t variable to (unsigned int). The
  cast should be safe as in all instances the number involved is small.

Note: mingw64 targets msvcrt.dll runtime that doesn't support %zu and
      print "zu" instead of the number. With -Wformat the compiler
      does warn that z is an unknown conversion type.

v2: Cast to (unsigned int) instead of (int).

Signed-off-by: Selva Nair <selva.nair@gmail.com>
Acked-by: Gert Doering <gert@greenie.muc.de>
Acked-by: David Sommerseth <davids@openvpn.net>
Message-Id: <1470956309-31268-1-git-send-email-selva.nair@gmail.com>
URL: https://sourceforge.net/p/openvpn/mailman/message/35274787/
Signed-off-by: David Sommerseth <davids@openvpn.net>
src/openvpn/crypto.c
src/openvpn/options.c
src/openvpn/ssl_mbedtls.c