"unused parameter" error when compiling

Hi, I try to build mbedTLS (3.6.1) for a STM32 microcontroller.

I get this error:

***/home/jonas_a/AtlasCopco/build/git_rev_mbedtls_3_6_1_url_https___tooscm_scs_domain_external_github_com_mbedtls-inc/library/ssl_tls.c: In function ‘mbedtls_ssl_get_base_mode’: ***
/home/jonas_a/AtlasCopco/build/git_rev_mbedtls_3_6_1_url_https___tooscm_scs_domain_external_github_com_mbedtls-inc/library/ssl_tls.c:2365:27: error: unused parameter ‘mode’ [-Werror=unused-parameter]

I get alot of “unused parameter” error. What might the root cause be?

BR
Jonas