Review corrections 2
-Fix MSVC compiler warnings about size_t to uint32_t conversions by
updating GET/PUT functions signature to use size_t.
-Add type casts to functions calling GET/PUT conversions
-Remove additional space after return statement
diff --git a/library/ssl_cli.c b/library/ssl_cli.c
index 530b067..331285f 100644
--- a/library/ssl_cli.c
+++ b/library/ssl_cli.c
@@ -1707,7 +1707,7 @@
#endif /* !MBEDTLS_SSL_CONF_FIXED_MAJOR_VER */
}
- MBEDTLS_SSL_DEBUG_MSG( 3, ( "server hello, current time: %lu", mbedtls_platform_get_uint32_be(&buf[2])) );
+ MBEDTLS_SSL_DEBUG_MSG( 3, ( "server hello, current time: %lu", (unsigned long)mbedtls_platform_get_uint32_be(&buf[2])) );
memcpy( ssl->handshake->randbytes + 32, buf + 2, 32 );
@@ -1750,7 +1750,7 @@
}
/* ciphersuite (used later) */
- i = mbedtls_platform_get_uint16_be( &buf[ 35 + n ] );
+ i = (int)mbedtls_platform_get_uint16_be( &buf[ 35 + n ] );
/*
* Read and check compression
@@ -4056,7 +4056,7 @@
msg = ssl->in_msg + mbedtls_ssl_hs_hdr_len( ssl );
- lifetime = mbedtls_platform_get_uint32_be( msg );
+ lifetime = (uint32_t)mbedtls_platform_get_uint32_be( msg );
ticket_len = mbedtls_platform_get_uint16_be( &msg[4] );