mirror of
https://github.com/yuzu-emu/mbedtls.git
synced 2024-11-29 22:04:15 +01:00
Avoid unused variable warning in ServerKeyExchange parsing
ssl_server_key_exchange_parse() is compiled even if there's no ciphersuite enabled which uses it (for example, that's the case in RSA-only builds). The rationale for that is to avoid cluttering the code with numerous compile-time guards. A consequence, however, is the top of ssl_server_key_exchange_parse() contains declarations for variables which are never put to use, and rightfully leading to compiler warnings. This commit silences these warnings by putting `((void) VAR);` statements in the branch which detects if we ever happen to call the function in an unexpected ciphersuite.
This commit is contained in:
parent
868cb586cc
commit
a855cb635d
@ -2892,6 +2892,10 @@ static int ssl_server_key_exchange_parse( mbedtls_ssl_context *ssl,
|
||||
else
|
||||
#endif /* MBEDTLS_KEY_EXCHANGE_ECJPAKE_ENABLED */
|
||||
{
|
||||
((void) ret);
|
||||
((void) p);
|
||||
((void) end);
|
||||
((void) ciphersuite_info);
|
||||
MBEDTLS_SSL_DEBUG_MSG( 1, ( "should never happen" ) );
|
||||
return( MBEDTLS_ERR_SSL_INTERNAL_ERROR );
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user