From f0fec77e3e33235adcb1d6d09d62def877b86c12 Mon Sep 17 00:00:00 2001 From: irwir Date: Mon, 20 Apr 2020 13:50:28 +0300 Subject: [PATCH] Fix "same actions in two cases of a switch statement" warning Resolves #3202 Signed-off-by: irwir --- library/md.c | 6 ------ 1 file changed, 6 deletions(-) diff --git a/library/md.c b/library/md.c index b56c2ddfe..30a580b02 100644 --- a/library/md.c +++ b/library/md.c @@ -553,14 +553,12 @@ int mbedtls_md_update( mbedtls_md_context_t *ctx, const unsigned char *input, si #endif #if defined(MBEDTLS_SHA256_C) case MBEDTLS_MD_SHA224: - return( mbedtls_sha256_update_ret( ctx->md_ctx, input, ilen ) ); case MBEDTLS_MD_SHA256: return( mbedtls_sha256_update_ret( ctx->md_ctx, input, ilen ) ); #endif #if defined(MBEDTLS_SHA512_C) #if !defined(MBEDTLS_SHA512_NO_SHA384) case MBEDTLS_MD_SHA384: - return( mbedtls_sha512_update_ret( ctx->md_ctx, input, ilen ) ); #endif case MBEDTLS_MD_SHA512: return( mbedtls_sha512_update_ret( ctx->md_ctx, input, ilen ) ); @@ -599,14 +597,12 @@ int mbedtls_md_finish( mbedtls_md_context_t *ctx, unsigned char *output ) #endif #if defined(MBEDTLS_SHA256_C) case MBEDTLS_MD_SHA224: - return( mbedtls_sha256_finish_ret( ctx->md_ctx, output ) ); case MBEDTLS_MD_SHA256: return( mbedtls_sha256_finish_ret( ctx->md_ctx, output ) ); #endif #if defined(MBEDTLS_SHA512_C) #if !defined(MBEDTLS_SHA512_NO_SHA384) case MBEDTLS_MD_SHA384: - return( mbedtls_sha512_finish_ret( ctx->md_ctx, output ) ); #endif case MBEDTLS_MD_SHA512: return( mbedtls_sha512_finish_ret( ctx->md_ctx, output ) ); @@ -856,14 +852,12 @@ int mbedtls_md_process( mbedtls_md_context_t *ctx, const unsigned char *data ) #endif #if defined(MBEDTLS_SHA256_C) case MBEDTLS_MD_SHA224: - return( mbedtls_internal_sha256_process( ctx->md_ctx, data ) ); case MBEDTLS_MD_SHA256: return( mbedtls_internal_sha256_process( ctx->md_ctx, data ) ); #endif #if defined(MBEDTLS_SHA512_C) #if !defined(MBEDTLS_SHA512_NO_SHA384) case MBEDTLS_MD_SHA384: - return( mbedtls_internal_sha512_process( ctx->md_ctx, data ) ); #endif case MBEDTLS_MD_SHA512: return( mbedtls_internal_sha512_process( ctx->md_ctx, data ) );