Skip to content

Commit

Permalink
Fix casts depending on OS
Browse files Browse the repository at this point in the history
  • Loading branch information
Andras Fekete committed May 14, 2024
1 parent a59a3d1 commit a1797f0
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions examples/client/client.c
Original file line number Diff line number Diff line change
Expand Up @@ -801,7 +801,7 @@ static int ClientBenchmarkThroughput(WOLFSSL_CTX* ctx, char* host, word16 port,
if (exitWithRet)
return err;

#ifdef __MINGW32__
#if defined(__MINGW32__) || defined(_WIN32)
#define SIZE_FMT "%d"
#define SIZE_TYPE int
#else
Expand Down Expand Up @@ -852,7 +852,7 @@ static int StartTLS_Init(SOCKET_T* sockfd)
}

/* C: EHLO mail.example.com */
if (send(*sockfd, starttlsCmd[1], XSTRLEN(starttlsCmd[1]), 0) !=
if (send(*sockfd, starttlsCmd[1], (SIZE_TYPE)XSTRLEN(starttlsCmd[1]), 0) !=
(int)XSTRLEN(starttlsCmd[1]))
err_sys("failed to send STARTTLS EHLO command\n");

Expand All @@ -869,7 +869,7 @@ static int StartTLS_Init(SOCKET_T* sockfd)
}

/* C: STARTTLS */
if (send(*sockfd, starttlsCmd[3], XSTRLEN(starttlsCmd[3]), 0) !=
if (send(*sockfd, starttlsCmd[3], (SIZE_TYPE)XSTRLEN(starttlsCmd[3]), 0) !=
(int)XSTRLEN(starttlsCmd[3])) {
err_sys("failed to send STARTTLS command\n");
}
Expand Down

0 comments on commit a1797f0

Please sign in to comment.