mbedtls icon indicating copy to clipboard operation
mbedtls copied to clipboard

[tls13_mps] Fixes to clang 12 compilation issues, removing trailing whitespace

Open oesh opened this issue 4 years ago • 1 comments

This commit prevents early return when TLS1_3 enabled, TLS1_2 disabled and SOME_MODES_USE_MAC enabled.

Without the commit, the compilation fails due to unreachable code, e.g.

/Users/oshapira/git/mbedtls/library/ssl_msg.c:1723:13: error: code will never be executed [-Werror,-Wunreachable-code]
        if( mbedtls_ssl_safer_memcmp( mac_peer, mac_expect,
            ^~~~~~~~~~~~~~~~~~~~~~~~
/Users/oshapira/git/mbedtls/library/ssl_msg.c:1625:9: error: code will never be executed [-Werror,-Wunreachable-code]
        rec->data_len -= padlen;
        ^~~
2 errors generated.

Signed-off-by: Omer Shapira [email protected]

oesh avatar Nov 12 '20 20:11 oesh