1
0
mirror of https://git.libssh.org/projects/libssh.git synced 2025-07-31 00:03:07 +03:00

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 <asn@cryptomilk.org>
This commit is contained in:
Andreas Schneider
2019-01-22 13:09:33 +01:00
parent 0ceda043ce
commit 98a8bf771d

View File

@ -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) static void *thread_pki_rsa_import_cert_file(void *threadid)
{ {
int rc; int rc;
ssh_key cert; ssh_key cert = NULL;
enum ssh_keytypes_e type; enum ssh_keytypes_e type;
(void) threadid; /* unused */ (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) static void *thread_pki_rsa_publickey_base64(void *threadid)
{ {
enum ssh_keytypes_e type; enum ssh_keytypes_e type;
char *b64_key, *key_buf, *p; char *b64_key = NULL, *key_buf = NULL, *p = NULL;
const char *q; const char *q = NULL;
ssh_key key; ssh_key key;
int rc; int rc;
@ -482,11 +482,11 @@ static void torture_pki_rsa_publickey_base64(void **state)
static void *thread_pki_rsa_duplicate_key(void *threadid) static void *thread_pki_rsa_duplicate_key(void *threadid)
{ {
char *b64_key; char *b64_key = NULL;
char *b64_key_gen; char *b64_key_gen = NULL;
ssh_key pubkey; ssh_key pubkey = NULL;
ssh_key privkey; ssh_key privkey = NULL;
ssh_key privkey_dup; ssh_key privkey_dup = NULL;
int cmp; int cmp;
int rc; int rc;