From e9c6b53e74e2a316a6d3651b99fd0c4f6a7d37fb Mon Sep 17 00:00:00 2001 From: Jerry Yu Date: Thu, 17 Aug 2023 13:53:38 +0800 Subject: [PATCH] remove return-type when runtime detection enabled without plain c This case does not exist Signed-off-by: Jerry Yu --- library/aes.c | 14 -------------- 1 file changed, 14 deletions(-) diff --git a/library/aes.c b/library/aes.c index 968cd3138..7a6f2d91c 100644 --- a/library/aes.c +++ b/library/aes.c @@ -656,13 +656,6 @@ int mbedtls_aes_setkey_enc(mbedtls_aes_context *ctx, const unsigned char *key, } #endif -/* When runtime detection enabled and plain C is disabled, compiler - reports `-Werror=return-type`. */ -#if defined(MBEDTLS_HAVE_X86) && defined(MBEDTLS_AES_USE_HARDWARE_ONLY) && \ - defined(MBEDTLS_PADLOCK_C) && defined(MBEDTLS_AESNI_HAVE_CODE) - return MBEDTLS_ERR_PLATFORM_FEATURE_UNSUPPORTED; -#endif - #if !defined(MBEDTLS_AES_USE_HARDWARE_ONLY) for (i = 0; i < (keybits >> 5); i++) { RK[i] = MBEDTLS_GET_UINT32_LE(key, i << 2); @@ -1109,13 +1102,6 @@ int mbedtls_aes_crypt_ecb(mbedtls_aes_context *ctx, } #endif -/* When runtime detection enabled and plain C is disabled, compiler - reports `-Werror=return-type`. */ -#if defined(MBEDTLS_AES_USE_HARDWARE_ONLY) && \ - defined(MBEDTLS_VIA_PADLOCK_HAVE_CODE) && defined(MBEDTLS_AESNI_HAVE_CODE) - return MBEDTLS_ERR_PLATFORM_FEATURE_UNSUPPORTED; -#endif - #if !defined(MBEDTLS_AES_USE_HARDWARE_ONLY) if (mode == MBEDTLS_AES_ENCRYPT) { return mbedtls_internal_aes_encrypt(ctx, input, output);