From 98a8bf771d8d854e9e07e45c03b9087da07629e6 Mon Sep 17 00:00:00 2001 From: Andreas Schneider Date: Tue, 22 Jan 2019 13:09:33 +0100 Subject: [PATCH] tests: Fix uninitialized warning in torture_threads_pki_rsa Error: CLANG_WARNING: tests/unittests/torture_threads_pki_rsa.c:520:5: warning: 1st function call argument is an uninitialized value Signed-off-by: Andreas Schneider --- tests/unittests/torture_threads_pki_rsa.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/tests/unittests/torture_threads_pki_rsa.c b/tests/unittests/torture_threads_pki_rsa.c index 8dd14bfa..31837ce2 100644 --- a/tests/unittests/torture_threads_pki_rsa.c +++ b/tests/unittests/torture_threads_pki_rsa.c @@ -402,7 +402,7 @@ static void torture_pki_rsa_copy_cert_to_privkey(void **state) static void *thread_pki_rsa_import_cert_file(void *threadid) { int rc; - ssh_key cert; + ssh_key cert = NULL; enum ssh_keytypes_e type; (void) threadid; /* unused */ @@ -434,8 +434,8 @@ static void torture_pki_rsa_import_cert_file(void **state) static void *thread_pki_rsa_publickey_base64(void *threadid) { enum ssh_keytypes_e type; - char *b64_key, *key_buf, *p; - const char *q; + char *b64_key = NULL, *key_buf = NULL, *p = NULL; + const char *q = NULL; ssh_key key; int rc; @@ -482,11 +482,11 @@ static void torture_pki_rsa_publickey_base64(void **state) static void *thread_pki_rsa_duplicate_key(void *threadid) { - char *b64_key; - char *b64_key_gen; - ssh_key pubkey; - ssh_key privkey; - ssh_key privkey_dup; + char *b64_key = NULL; + char *b64_key_gen = NULL; + ssh_key pubkey = NULL; + ssh_key privkey = NULL; + ssh_key privkey_dup = NULL; int cmp; int rc;