Skip to content

Commit

Permalink
Fix unused symbol warnings in tests.
Browse files Browse the repository at this point in the history
And actually fix two real bugs...
  • Loading branch information
mbroz committed Aug 28, 2023
1 parent 81574d0 commit 8c87958
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
4 changes: 4 additions & 0 deletions tests/all-symbols-test.c
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,10 @@ static int check_dlvsym(void *h, const char *symbol, const char *version)
}

log_dbg("OK\n");
#else
UNUSED(h);
UNUSED(symbol);
UNUSED(version);
#endif
return 0;
}
Expand Down
8 changes: 4 additions & 4 deletions tests/api-test-2.c
Original file line number Diff line number Diff line change
Expand Up @@ -520,7 +520,7 @@ static key_serial_t _kernel_key_by_segment_and_type(struct crypt_device *_cd, in

static key_serial_t _kernel_key_by_segment(struct crypt_device *_cd, int segment)
{
return _kernel_key_by_segment_and_type(cd, segment, "logon");
return _kernel_key_by_segment_and_type(_cd, segment, "logon");
}

static int _volume_key_in_keyring(struct crypt_device *_cd, int segment)
Expand All @@ -541,7 +541,7 @@ static int _drop_keyring_key_from_keyring_type(struct crypt_device *_cd, int seg

static int _drop_keyring_key(struct crypt_device *_cd, int segment)
{
return _drop_keyring_key_from_keyring_type(cd, segment, KEY_SPEC_THREAD_KEYRING, "logon");
return _drop_keyring_key_from_keyring_type(_cd, segment, KEY_SPEC_THREAD_KEYRING, "logon");
}
#endif

Expand All @@ -561,7 +561,7 @@ static int test_open(struct crypt_device *_cd __attribute__((unused)),
return 0;
}

static int test_open_pass(struct crypt_device *cd __attribute__((unused)),
static int test_open_pass(struct crypt_device *_cd __attribute__((unused)),
int token __attribute__((unused)),
char **buffer,
size_t *buffer_len,
Expand All @@ -575,7 +575,7 @@ static int test_open_pass(struct crypt_device *cd __attribute__((unused)),
return 0;
}

static int test_open_pass1(struct crypt_device *cd __attribute__((unused)),
static int test_open_pass1(struct crypt_device *_cd __attribute__((unused)),
int token __attribute__((unused)),
char **buffer,
size_t *buffer_len,
Expand Down

0 comments on commit 8c87958

Please sign in to comment.