From 37cad6e9bafd53ef7d9f4baa72b8f1ecb056e552 Mon Sep 17 00:00:00 2001 From: Takashi Kojo Date: Wed, 22 Jan 2020 08:12:51 +0900 Subject: [PATCH] %zu, pragma: not supported, --- examples/client/client.c | 4 ++++ examples/server/server.c | 4 ++++ wolfssl/wolfcrypt/types.h | 2 ++ 3 files changed, 10 insertions(+) diff --git a/examples/client/client.c b/examples/client/client.c index 8940b445e..85d082574 100644 --- a/examples/client/client.c +++ b/examples/client/client.c @@ -631,7 +631,11 @@ static int ClientBenchmarkThroughput(WOLFSSL_CTX* ctx, char* host, word16 port, wolfSSL_free(ssl); ssl = NULL; CloseSocket(sockfd); +#if !defined(__MINGW32__) printf("wolfSSL Client Benchmark %zu bytes\n" +#else + printf("wolfSSL Client Benchmark %d bytes\n" +#endif "\tConnect %8.3f ms\n" "\tTX %8.3f ms (%8.3f MBps)\n" "\tRX %8.3f ms (%8.3f MBps)\n", diff --git a/examples/server/server.c b/examples/server/server.c index 1c314c50a..3f1129184 100644 --- a/examples/server/server.c +++ b/examples/server/server.c @@ -417,7 +417,11 @@ int ServerEchoData(SSL* ssl, int clientfd, int echoData, int block, free(buffer); if (throughput) { + #if !defined(__MINGW32__) printf("wolfSSL Server Benchmark %zu bytes\n" + #else + printf("wolfSSL Server Benchmark %d bytes\n" + #endif "\tRX %8.3f ms (%8.3f MBps)\n" "\tTX %8.3f ms (%8.3f MBps)\n", throughput, diff --git a/wolfssl/wolfcrypt/types.h b/wolfssl/wolfcrypt/types.h index 99c615233..08553b4b1 100644 --- a/wolfssl/wolfcrypt/types.h +++ b/wolfssl/wolfcrypt/types.h @@ -483,7 +483,9 @@ #else /* 4996 warning to use MS extensions e.g., _sprintf_s instead of _snprintf */ + #if !defined(__MINGW32__) #pragma warning(disable: 4996) + #endif static WC_INLINE int xsnprintf(char *buffer, size_t bufsize, const char *format, ...) {