From 101c659117384900cda6b90bab33b68d940115e9 Mon Sep 17 00:00:00 2001 From: Aaron Jones Date: Thu, 15 Sep 2016 12:45:00 +0000 Subject: [PATCH] MbedTLS: Cast addrlen rb_ssl_accept_setup to avoid compiler warnings --- libratbox/src/mbedtls.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libratbox/src/mbedtls.c b/libratbox/src/mbedtls.c index 202c9308..0bada7e7 100644 --- a/libratbox/src/mbedtls.c +++ b/libratbox/src/mbedtls.c @@ -786,9 +786,9 @@ rb_ssl_accept_setup(rb_fde_t *const srv_F, rb_fde_t *const cli_F, struct sockadd cli_F->accept = rb_malloc(sizeof(struct acceptdata)); cli_F->accept->callback = srv_F->accept->callback; cli_F->accept->data = srv_F->accept->data; - cli_F->accept->addrlen = addrlen; + cli_F->accept->addrlen = (rb_socklen_t) addrlen; (void) memset(&cli_F->accept->S, 0x00, sizeof cli_F->accept->S); - (void) memcpy(&cli_F->accept->S, st, addrlen); + (void) memcpy(&cli_F->accept->S, st, (size_t) addrlen); rb_settimeout(cli_F, 10, rb_ssl_timeout_cb, NULL); rb_ssl_init_fd(cli_F, RB_FD_TLS_DIRECTION_IN);