diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt index 45854f154d..2431e40697 100644 --- a/tests/CMakeLists.txt +++ b/tests/CMakeLists.txt @@ -140,10 +140,6 @@ endfunction(add_test_suite) # on non-POSIX platforms. add_definitions("-D_POSIX_C_SOURCE=200809L") -if(CMAKE_COMPILER_IS_GNUCC OR CMAKE_COMPILER_IS_CLANG) - set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wno-unused-function") -endif(CMAKE_COMPILER_IS_GNUCC OR CMAKE_COMPILER_IS_CLANG) - if(CMAKE_COMPILER_IS_CLANG) set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wdocumentation -Wno-documentation-deprecated-sync -Wunreachable-code") endif(CMAKE_COMPILER_IS_CLANG) diff --git a/tests/suites/test_suite_ssl.function b/tests/suites/test_suite_ssl.function index 4f5ee9762d..3831d4adf7 100644 --- a/tests/suites/test_suite_ssl.function +++ b/tests/suites/test_suite_ssl.function @@ -1205,7 +1205,8 @@ int psk_dummy_callback( void *p_info, mbedtls_ssl_context *ssl, #define SSL_CID_LEN_MIN MBEDTLS_SSL_CID_OUT_LEN_MAX #endif -#if defined(MBEDTLS_SSL_PROTO_TLS1_2) +#if defined(MBEDTLS_SSL_PROTO_TLS1_2) && \ + defined(MBEDTLS_CIPHER_MODE_CBC) && defined(MBEDTLS_AES_C) static int psa_cipher_encrypt_helper( mbedtls_ssl_transform *transform, const unsigned char *iv, size_t iv_len, const unsigned char *input, size_t ilen, @@ -1246,7 +1247,7 @@ static int psa_cipher_encrypt_helper( mbedtls_ssl_transform *transform, iv, iv_len, input, ilen, output, olen ); #endif /* MBEDTLS_USE_PSA_CRYPTO */ } -#endif /* MBEDTLS_SSL_PROTO_TLS1_2 */ +#endif /* MBEDTLS_SSL_PROTO_TLS1_2 && MBEDTLS_CIPHER_MODE_CBC && MBEDTLS_AES_C */ static int build_transforms( mbedtls_ssl_transform *t_in, mbedtls_ssl_transform *t_out,