Fix IAR statement is unreachable warning
Signed-off-by: Dave Rodgman <dave.rodgman@arm.com>
This commit is contained in:
parent
90330a4a2d
commit
9329252620
1 changed files with 22 additions and 30 deletions
|
@ -525,7 +525,13 @@ static inline psa_status_t psa_driver_wrapper_sign_hash_start(
|
|||
size_t key_buffer_size, psa_algorithm_t alg,
|
||||
const uint8_t *hash, size_t hash_length )
|
||||
{
|
||||
psa_status_t status = PSA_ERROR_CORRUPTION_DETECTED;
|
||||
( void ) operation;
|
||||
( void ) key_buffer;
|
||||
( void ) key_buffer_size;
|
||||
( void ) alg;
|
||||
( void ) hash;
|
||||
( void ) hash_length;
|
||||
|
||||
psa_key_location_t location =
|
||||
PSA_KEY_LIFETIME_GET_LOCATION(
|
||||
attributes->core.lifetime );
|
||||
|
@ -558,18 +564,8 @@ static inline psa_status_t psa_driver_wrapper_sign_hash_start(
|
|||
|
||||
default:
|
||||
/* Key is declared with a lifetime not known to us */
|
||||
( void ) status;
|
||||
return( PSA_ERROR_INVALID_ARGUMENT );
|
||||
}
|
||||
|
||||
( void ) operation;
|
||||
( void ) key_buffer;
|
||||
( void ) key_buffer_size;
|
||||
( void ) alg;
|
||||
( void ) hash;
|
||||
( void ) hash_length;
|
||||
|
||||
return( status );
|
||||
}
|
||||
|
||||
static inline psa_status_t psa_driver_wrapper_sign_hash_complete(
|
||||
|
@ -625,8 +621,15 @@ static inline psa_status_t psa_driver_wrapper_verify_hash_start(
|
|||
const uint8_t *hash, size_t hash_length,
|
||||
const uint8_t *signature, size_t signature_length )
|
||||
{
|
||||
( void ) operation;
|
||||
( void ) key_buffer;
|
||||
( void ) key_buffer_size;
|
||||
( void ) alg;
|
||||
( void ) hash;
|
||||
( void ) hash_length;
|
||||
( void ) signature;
|
||||
( void ) signature_length;
|
||||
|
||||
psa_status_t status = PSA_ERROR_CORRUPTION_DETECTED;
|
||||
psa_key_location_t location = PSA_KEY_LIFETIME_GET_LOCATION(
|
||||
attributes->core.lifetime );
|
||||
|
||||
|
@ -660,20 +663,8 @@ static inline psa_status_t psa_driver_wrapper_verify_hash_start(
|
|||
|
||||
default:
|
||||
/* Key is declared with a lifetime not known to us */
|
||||
( void ) status;
|
||||
return( PSA_ERROR_INVALID_ARGUMENT );
|
||||
}
|
||||
|
||||
( void ) operation;
|
||||
( void ) key_buffer;
|
||||
( void ) key_buffer_size;
|
||||
( void ) alg;
|
||||
( void ) hash;
|
||||
( void ) hash_length;
|
||||
( void ) signature;
|
||||
( void ) signature_length;
|
||||
|
||||
return( status );
|
||||
}
|
||||
|
||||
static inline psa_status_t psa_driver_wrapper_verify_hash_complete(
|
||||
|
@ -2724,6 +2715,7 @@ static inline psa_status_t psa_driver_wrapper_pake_setup(
|
|||
case PSA_KEY_LOCATION_LOCAL_STORAGE:
|
||||
/* Key is stored in the slot in export representation, so
|
||||
* cycle through all known transparent accelerators */
|
||||
status = PSA_ERROR_NOT_SUPPORTED;
|
||||
#if defined(PSA_CRYPTO_ACCELERATOR_DRIVER_PRESENT)
|
||||
#if defined(PSA_CRYPTO_DRIVER_TEST)
|
||||
status = mbedtls_test_transparent_pake_setup(
|
||||
|
@ -2741,9 +2733,8 @@ static inline psa_status_t psa_driver_wrapper_pake_setup(
|
|||
inputs );
|
||||
if( status == PSA_SUCCESS )
|
||||
operation->id = PSA_CRYPTO_MBED_TLS_DRIVER_ID;
|
||||
return status;
|
||||
#endif
|
||||
return( PSA_ERROR_NOT_SUPPORTED );
|
||||
return status;
|
||||
/* Add cases for opaque driver here */
|
||||
default:
|
||||
/* Key is declared with a lifetime not known to us */
|
||||
|
@ -2761,6 +2752,11 @@ static inline psa_status_t psa_driver_wrapper_pake_output(
|
|||
size_t output_size,
|
||||
size_t *output_length )
|
||||
{
|
||||
(void) step;
|
||||
(void) output;
|
||||
(void) output_size;
|
||||
(void) output_length;
|
||||
|
||||
switch( operation->id )
|
||||
{
|
||||
#if defined(MBEDTLS_PSA_BUILTIN_PAKE)
|
||||
|
@ -2778,10 +2774,6 @@ static inline psa_status_t psa_driver_wrapper_pake_output(
|
|||
#endif /* PSA_CRYPTO_DRIVER_TEST */
|
||||
#endif /* PSA_CRYPTO_ACCELERATOR_DRIVER_PRESENT */
|
||||
default:
|
||||
(void) step;
|
||||
(void) output;
|
||||
(void) output_size;
|
||||
(void) output_length;
|
||||
return( PSA_ERROR_INVALID_ARGUMENT );
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue