From 0e2c07e83e6d2b5b82d00b85483a1dbc11c1ca56 Mon Sep 17 00:00:00 2001 From: Dawid Drozd Date: Wed, 11 Jul 2018 15:16:53 +0200 Subject: [PATCH 1/2] Remove unnecessary mark as unused #1098 `ret` is used always at line 1305 in statement: `if( ( ret = pk_parse_key_pkcs8_unencrypted_der( pk, key, keylen ) ) == 0 )` --- library/pkparse.c | 1 - 1 file changed, 1 deletion(-) diff --git a/library/pkparse.c b/library/pkparse.c index ccb7f5409..d6ac987e2 100644 --- a/library/pkparse.c +++ b/library/pkparse.c @@ -1261,7 +1261,6 @@ int mbedtls_pk_parse_key( mbedtls_pk_context *pk, return( ret ); #endif /* MBEDTLS_PKCS12_C || MBEDTLS_PKCS5_C */ #else - ((void) ret); ((void) pwd); ((void) pwdlen); #endif /* MBEDTLS_PEM_PARSE_C */ From ecb635efca154a929039e9b40f212fed923f79e2 Mon Sep 17 00:00:00 2001 From: Simon Butcher Date: Tue, 24 Jul 2018 10:03:41 +0100 Subject: [PATCH 2/2] Add ChangeLog entry for #1098 fix. --- ChangeLog | 3 +++ 1 file changed, 3 insertions(+) diff --git a/ChangeLog b/ChangeLog index 305eef60b..2b19e3547 100644 --- a/ChangeLog +++ b/ChangeLog @@ -29,6 +29,9 @@ Bugfix by Brendan Shanks. Part of a fix for #992. * Fix compilation error when MBEDTLS_ARC4_C is disabled and MBEDTLS_CIPHER_NULL_CIPHER is enabled. Found by TrinityTonic in #1719. + * Fix compiler warning of 'use before initialisation' in + mbedtls_pk_parse_key(). Found by Martin Boye Petersen and fixed by Dawid + Drozd. #1098 Changes * Change the shebang line in Perl scripts to look up perl in the PATH.