Skip to content

Commit

Permalink
Fix llvm error: variables may be used uninitialized
Browse files Browse the repository at this point in the history
Signed-off-by: Sergey <[email protected]>
  • Loading branch information
sergio-nsk committed Mar 6, 2023
1 parent 228a30d commit 8849e6b
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions library/psa_crypto.c
Original file line number Diff line number Diff line change
Expand Up @@ -3997,7 +3997,7 @@ psa_status_t psa_cipher_generate_iv(psa_cipher_operation_t *operation,
{
psa_status_t status = PSA_ERROR_CORRUPTION_DETECTED;
uint8_t local_iv[PSA_CIPHER_IV_MAX_SIZE];
size_t default_iv_length;
size_t default_iv_length = 0;

if (operation->id == 0) {
status = PSA_ERROR_BAD_STATE;
Expand Down Expand Up @@ -4604,7 +4604,7 @@ psa_status_t psa_aead_generate_nonce(psa_aead_operation_t *operation,
{
psa_status_t status = PSA_ERROR_CORRUPTION_DETECTED;
uint8_t local_nonce[PSA_AEAD_NONCE_MAX_SIZE];
size_t required_nonce_size;
size_t required_nonce_size = 0;

*nonce_length = 0;

Expand Down
2 changes: 1 addition & 1 deletion library/ssl_cache.c
Original file line number Diff line number Diff line change
Expand Up @@ -246,7 +246,7 @@ int mbedtls_ssl_cache_set(void *data,
mbedtls_ssl_cache_context *cache = (mbedtls_ssl_cache_context *) data;
mbedtls_ssl_cache_entry *cur;

size_t session_serialized_len;
size_t session_serialized_len = 0;
unsigned char *session_serialized = NULL;

#if defined(MBEDTLS_THREADING_C)
Expand Down

0 comments on commit 8849e6b

Please sign in to comment.