Review corrections 6
-Explicitly discard unnecessary return values of
mbedtls_platform_put_uintXX_be by adding void casting.
diff --git a/library/ssl_cli.c b/library/ssl_cli.c
index 425d357..e3aabb7 100644
--- a/library/ssl_cli.c
+++ b/library/ssl_cli.c
@@ -670,9 +670,9 @@
*olen = p - buf;
/* List length = olen - 2 (ext_type) - 2 (ext_len) - 2 (list_len) */
- mbedtls_platform_put_uint16_be( &buf[4], ( *olen - 6 ) );
+ (void)mbedtls_platform_put_uint16_be( &buf[4], ( *olen - 6 ) );
/* Extension length = olen - 2 (ext_type) - 2 (ext_len) */
- mbedtls_platform_put_uint16_be( &buf[2], ( *olen - 4 ) );
+ (void)mbedtls_platform_put_uint16_be( &buf[2], ( *olen - 4 ) );
}
#endif /* MBEDTLS_SSL_ALPN */
@@ -2421,7 +2421,7 @@
defined(MBEDTLS_SSL_PROTO_TLS1_2)
if( len_bytes == 2 )
{
- mbedtls_platform_put_uint16_be( out, *olen );
+ (void)mbedtls_platform_put_uint16_be( out, *olen );
*olen += 2;
}
#endif
@@ -3987,7 +3987,7 @@
return( ret );
}
- mbedtls_platform_put_uint16_be( &ssl->out_msg[4 + offset], n );
+ (void)mbedtls_platform_put_uint16_be( &ssl->out_msg[4 + offset], n );
ssl->out_msglen = 6 + n + offset;
ssl->out_msgtype = MBEDTLS_SSL_MSG_HANDSHAKE;