%zu, pragma: not supported,

This commit is contained in:
Takashi Kojo
2020-01-22 08:12:51 +09:00
parent aabdec214e
commit 37cad6e9ba
3 changed files with 10 additions and 0 deletions

View File

@ -631,7 +631,11 @@ static int ClientBenchmarkThroughput(WOLFSSL_CTX* ctx, char* host, word16 port,
wolfSSL_free(ssl); ssl = NULL; wolfSSL_free(ssl); ssl = NULL;
CloseSocket(sockfd); CloseSocket(sockfd);
#if !defined(__MINGW32__)
printf("wolfSSL Client Benchmark %zu bytes\n" printf("wolfSSL Client Benchmark %zu bytes\n"
#else
printf("wolfSSL Client Benchmark %d bytes\n"
#endif
"\tConnect %8.3f ms\n" "\tConnect %8.3f ms\n"
"\tTX %8.3f ms (%8.3f MBps)\n" "\tTX %8.3f ms (%8.3f MBps)\n"
"\tRX %8.3f ms (%8.3f MBps)\n", "\tRX %8.3f ms (%8.3f MBps)\n",

View File

@ -417,7 +417,11 @@ int ServerEchoData(SSL* ssl, int clientfd, int echoData, int block,
free(buffer); free(buffer);
if (throughput) { if (throughput) {
#if !defined(__MINGW32__)
printf("wolfSSL Server Benchmark %zu bytes\n" printf("wolfSSL Server Benchmark %zu bytes\n"
#else
printf("wolfSSL Server Benchmark %d bytes\n"
#endif
"\tRX %8.3f ms (%8.3f MBps)\n" "\tRX %8.3f ms (%8.3f MBps)\n"
"\tTX %8.3f ms (%8.3f MBps)\n", "\tTX %8.3f ms (%8.3f MBps)\n",
throughput, throughput,

View File

@ -483,7 +483,9 @@
#else #else
/* 4996 warning to use MS extensions e.g., _sprintf_s /* 4996 warning to use MS extensions e.g., _sprintf_s
instead of _snprintf */ instead of _snprintf */
#if !defined(__MINGW32__)
#pragma warning(disable: 4996) #pragma warning(disable: 4996)
#endif
static WC_INLINE static WC_INLINE
int xsnprintf(char *buffer, size_t bufsize, int xsnprintf(char *buffer, size_t bufsize,
const char *format, ...) { const char *format, ...) {