Prevent unused variable in some configurations

This commit is contained in:
k-stachowiak 2018-12-19 18:34:21 +01:00
parent a85edd9415
commit fb54360f8c

View file

@ -35,6 +35,8 @@ void cipher_invalid_param_unconditional( )
*( mbedtls_cipher_list() ) );
size_t size_t_var;
(void)valid_mode; /* In some configurations this is unused */
mbedtls_cipher_init( &valid_ctx );
mbedtls_cipher_setup( &valid_ctx, valid_info );
mbedtls_cipher_init( &invalid_ctx );
@ -157,6 +159,8 @@ void cipher_invalid_param_conditional( )
size_t size_t_var;
(void)valid_mode; /* In some configurations this is unused */
/* mbedtls_cipher_init() */
TEST_VALID_PARAM( mbedtls_cipher_init( &valid_ctx ) );
TEST_INVALID_PARAM( mbedtls_cipher_init( NULL ) );