From 577d39b93064cff1feeffe0ed26faca275ce1bd0 Mon Sep 17 00:00:00 2001 From: Simon Butcher Date: Thu, 14 Jun 2018 08:58:59 +0100 Subject: [PATCH] Compilation warning fixes on 32b platfrom with IAR Fix compilation warnings with IAR toolchain, on 32 bit platform. Reported by rahmanih in #683 This is based on work by Ron Eldor in PR #750. --- ChangeLog | 3 ++- library/ssl_srv.c | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index 93d017c6c6..838238b15c 100644 --- a/ChangeLog +++ b/ChangeLog @@ -3,7 +3,8 @@ mbed TLS ChangeLog (Sorted per branch, date) = mbed TLS x.x.x branch released xxxx-xx-xx Bugfix - + * Fix compilation warnings with IAR toolchain, on 32 bit platform. + Reported by rahmanih in #683 * Fix braces in mbedtls_memory_buffer_alloc_status(). Found by sbranden, #552. * Added the macro MBEDTLS_X509_MAX_FILE_PATH_LEN that enables the user to configure the maximum length of a file path that can be buffered when diff --git a/library/ssl_srv.c b/library/ssl_srv.c index af3722cec2..9a884f055e 100644 --- a/library/ssl_srv.c +++ b/library/ssl_srv.c @@ -2686,7 +2686,7 @@ static int ssl_write_server_key_exchange( mbedtls_ssl_context *ssl ) #if defined(MBEDTLS_KEY_EXCHANGE__SOME_PFS__ENABLED) unsigned char *p = ssl->out_msg + 4; - size_t len; + size_t len = 0; #if defined(MBEDTLS_KEY_EXCHANGE__WITH_SERVER_SIGNATURE__ENABLED) unsigned char *dig_signed = p; size_t dig_signed_len = 0;