remove return-type when runtime detection enabled without plain c

This case does not exist

Signed-off-by: Jerry Yu <jerry.h.yu@arm.com>
This commit is contained in:
Jerry Yu 2023-08-17 13:53:38 +08:00
parent f258d17acd
commit e9c6b53e74

View file

@ -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);