1
0
mirror of https://github.com/Mbed-TLS/mbedtls.git synced 2025-11-12 16:41:03 +03:00

add cast to fix IAR compiler errors

IAR throws a warning "mixed ENUM with other type"

Signed-off-by: Jan Spannberger <jan.spannberger@siemens.com>
This commit is contained in:
Jan Spannberger
2025-10-28 15:13:08 +01:00
committed by Jan Wille
parent 4624f508d3
commit a5384bdf09
2 changed files with 5 additions and 2 deletions

View File

@@ -0,0 +1,3 @@
Changes
* Add casts to some Enums to remove compiler errors thrown by IAR 6.5.
Removes Warning "mixed ENUM with other type".

View File

@@ -1315,14 +1315,14 @@ static inline void mbedtls_ssl_handshake_set_state(mbedtls_ssl_context *ssl,
mbedtls_ssl_states state)
{
MBEDTLS_SSL_DEBUG_MSG(3, ("handshake state: %d (%s) -> %d (%s)",
ssl->state, mbedtls_ssl_states_str(ssl->state),
ssl->state, mbedtls_ssl_states_str((mbedtls_ssl_states)ssl->state),
(int) state, mbedtls_ssl_states_str(state)));
ssl->state = (int) state;
}
static inline void mbedtls_ssl_handshake_increment_state(mbedtls_ssl_context *ssl)
{
mbedtls_ssl_handshake_set_state(ssl, ssl->state + 1);
mbedtls_ssl_handshake_set_state(ssl, (mbedtls_ssl_states)(ssl->state + 1));
}
MBEDTLS_CHECK_RETURN_CRITICAL