Skip to content

Commit 525dd91

Browse files
authored
Merge pull request #10477 from Cube707/fix/iar-compiler-warning
add cast to fix IAR compiler errors
2 parents 32b597b + 64e7d4b commit 525dd91

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

ChangeLog.d/iar-6.5fs.txt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
Changes
2+
* Add casts to some Enums to remove compiler errors thrown by IAR 6.5.
3+
Removes Warning "mixed ENUM with other type".

library/ssl_misc.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1315,14 +1315,14 @@ static inline void mbedtls_ssl_handshake_set_state(mbedtls_ssl_context *ssl,
13151315
mbedtls_ssl_states state)
13161316
{
13171317
MBEDTLS_SSL_DEBUG_MSG(3, ("handshake state: %d (%s) -> %d (%s)",
1318-
ssl->state, mbedtls_ssl_states_str(ssl->state),
1318+
ssl->state, mbedtls_ssl_states_str((mbedtls_ssl_states) ssl->state),
13191319
(int) state, mbedtls_ssl_states_str(state)));
13201320
ssl->state = (int) state;
13211321
}
13221322

13231323
static inline void mbedtls_ssl_handshake_increment_state(mbedtls_ssl_context *ssl)
13241324
{
1325-
mbedtls_ssl_handshake_set_state(ssl, ssl->state + 1);
1325+
mbedtls_ssl_handshake_set_state(ssl, (mbedtls_ssl_states) (ssl->state + 1));
13261326
}
13271327

13281328
MBEDTLS_CHECK_RETURN_CRITICAL

0 commit comments

Comments
 (0)