From 52e2f1a7aba921d400eec7bff6404b0b84980207 Mon Sep 17 00:00:00 2001 From: John Safranek Date: Tue, 23 Aug 2016 09:27:37 -0700 Subject: [PATCH] typecasts to clear static analysis warnings on SCTP examples --- examples/sctp/sctp-client-dtls.c | 2 +- examples/sctp/sctp-client.c | 2 +- examples/sctp/sctp-server-dtls.c | 2 +- examples/sctp/sctp-server.c | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/examples/sctp/sctp-client-dtls.c b/examples/sctp/sctp-client-dtls.c index c1708d451..d90fe2b4b 100644 --- a/examples/sctp/sctp-client-dtls.c +++ b/examples/sctp/sctp-client-dtls.c @@ -88,7 +88,7 @@ int main() printf("Cipher Suite is %s\n", wolfSSL_CIPHER_get_name(wolfSSL_get_current_cipher(ssl))); - wolfSSL_write(ssl, response, strlen(response)); + wolfSSL_write(ssl, response, (int)strlen(response)); int got = wolfSSL_read(ssl, buffer, sizeof(buffer)); if (got > 0) { buffer[got] = 0; diff --git a/examples/sctp/sctp-client.c b/examples/sctp/sctp-client.c index dece6cc88..b601fa403 100644 --- a/examples/sctp/sctp-client.c +++ b/examples/sctp/sctp-client.c @@ -52,7 +52,7 @@ int main() char buffer[80]; send(sd, msg, strlen(msg), 0); - int got = recv(sd, buffer, sizeof(buffer), 0); + int got = (int)recv(sd, buffer, sizeof(buffer), 0); if (got > 0) { buffer[got] = 0; printf("server said: %s\n", buffer); diff --git a/examples/sctp/sctp-server-dtls.c b/examples/sctp/sctp-server-dtls.c index d255c733c..8bf90cda3 100644 --- a/examples/sctp/sctp-server-dtls.c +++ b/examples/sctp/sctp-server-dtls.c @@ -103,7 +103,7 @@ int main() buffer[got] = 0; printf("client said: %s\n", buffer); } - wolfSSL_write(ssl, response, strlen(response)); + wolfSSL_write(ssl, response, (int)strlen(response)); wolfSSL_shutdown(ssl); wolfSSL_free(ssl); diff --git a/examples/sctp/sctp-server.c b/examples/sctp/sctp-server.c index 4228efbaa..fc0439d36 100644 --- a/examples/sctp/sctp-server.c +++ b/examples/sctp/sctp-server.c @@ -56,7 +56,7 @@ int main() const char* response = "hi there"; char buffer[80]; - int got = recv(client_sd, buffer, sizeof(buffer), 0); + int got = (int)recv(client_sd, buffer, sizeof(buffer), 0); if (got > 0) { buffer[got] = 0; printf("client said: %s\n", buffer);