diff options
| author | Andre Heinecke <[email protected]> | 2016-11-10 13:10:11 +0000 | 
|---|---|---|
| committer | Andre Heinecke <[email protected]> | 2016-11-10 13:14:54 +0000 | 
| commit | 4d5174e4a83dcd524f8085f6646145f81b50a02a (patch) | |
| tree | 19b8addd6385c18d0b2d3f471de29ccb268c9821 /tests/gpg/t-thread-keylist.c | |
| parent | core: Use gpgrt locking for thread safeness (diff) | |
| download | gpgme-4d5174e4a83dcd524f8085f6646145f81b50a02a.tar.gz gpgme-4d5174e4a83dcd524f8085f6646145f81b50a02a.zip | |
tests: Improve new thread tests
* tests/gpg/t-thread-keylist-verify.c (start_keylist): Mark
arg as unused. Release context.
(start_verify): Ditto.
(main): Mark args as unused.
* tests/gpg/t-thread-keylist.c (start_keylist):  Mark
arg as unused. Release context.
(main): Mark args as unused.
Diffstat (limited to 'tests/gpg/t-thread-keylist.c')
| -rw-r--r-- | tests/gpg/t-thread-keylist.c | 6 | 
1 files changed, 6 insertions, 0 deletions
| diff --git a/tests/gpg/t-thread-keylist.c b/tests/gpg/t-thread-keylist.c index 14f7718b..d585bf48 100644 --- a/tests/gpg/t-thread-keylist.c +++ b/tests/gpg/t-thread-keylist.c @@ -41,6 +41,7 @@ start_keylist (void *arg)    gpgme_ctx_t ctx;    gpgme_key_t key; +  (void) arg;    err = gpgme_new (&ctx);    fail_if_err (err); @@ -49,6 +50,8 @@ start_keylist (void *arg)    while (!(err = gpgme_op_keylist_next (ctx, &key))); +  gpgme_release (ctx); +    return NULL;  } @@ -59,6 +62,9 @@ main (int argc, char *argv[])    pthread_t keylist_threads[THREAD_COUNT];    init_gpgme (GPGME_PROTOCOL_OpenPGP); +  (void)argc; +  (void)argv; +    for (i = 0; i < THREAD_COUNT; i++)      {        if (pthread_create(&keylist_threads[i], NULL, start_keylist, NULL)) | 
