Skip to content

Commit 5e09bc7

Browse files
Fix maybe-uninitialized warning
GCC 4.8 warns that some variables may be used without having been initialized. They aren't, but determining that takes nontrivial analysis, so initialize them at the point of definition.
1 parent 1a76f39 commit 5e09bc7

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

programs/psa/key_ladder_demo.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -393,7 +393,7 @@ static psa_status_t wrap_data( const char *input_file_name,
393393
FILE *output_file = NULL;
394394
long input_position;
395395
size_t input_size;
396-
size_t buffer_size;
396+
size_t buffer_size = 0;
397397
unsigned char *buffer = NULL;
398398
size_t ciphertext_size;
399399
wrapped_data_header_t header;
@@ -469,7 +469,7 @@ static psa_status_t unwrap_data( const char *input_file_name,
469469
FILE *input_file = NULL;
470470
FILE *output_file = NULL;
471471
unsigned char *buffer = NULL;
472-
size_t ciphertext_size;
472+
size_t ciphertext_size = 0;
473473
size_t plaintext_size;
474474
wrapped_data_header_t header;
475475
unsigned char extra_byte;

0 commit comments

Comments
 (0)