[Pkg-gnupg-commit] [gpgme] 26/62: tests: Improve new thread tests
Daniel Kahn Gillmor
dkg at fifthhorseman.net
Sat Nov 19 04:03:33 UTC 2016
This is an automated email from the git hooks/post-receive script.
dkg pushed a commit to branch experimental
in repository gpgme.
commit 4d5174e4a83dcd524f8085f6646145f81b50a02a
Author: Andre Heinecke <aheinecke at intevation.de>
Date: Thu Nov 10 14:10:11 2016 +0100
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.
---
tests/gpg/t-thread-keylist-verify.c | 8 ++++++++
tests/gpg/t-thread-keylist.c | 6 ++++++
2 files changed, 14 insertions(+)
diff --git a/tests/gpg/t-thread-keylist-verify.c b/tests/gpg/t-thread-keylist-verify.c
index 55af88a..c77d6da 100644
--- a/tests/gpg/t-thread-keylist-verify.c
+++ b/tests/gpg/t-thread-keylist-verify.c
@@ -53,6 +53,7 @@ start_keylist (void *arg)
gpgme_ctx_t ctx;
gpgme_key_t key;
+ (void)arg;
err = gpgme_new (&ctx);
fail_if_err (err);
@@ -61,6 +62,7 @@ start_keylist (void *arg)
while (!(err = gpgme_op_keylist_next (ctx, &key)));
+ gpgme_release (ctx);
return NULL;
}
@@ -73,6 +75,8 @@ start_verify (void *arg)
gpgme_verify_result_t result;
gpgme_signature_t signature;
+ (void)arg;
+
err = gpgme_new (&ctx);
fail_if_err (err);
@@ -99,6 +103,7 @@ start_verify (void *arg)
__FILE__, __LINE__, gpgme_strerror (signature->status));
exit (1);
}
+ gpgme_release (ctx);
return NULL;
}
@@ -110,6 +115,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(&verify_threads[i], NULL, start_verify, NULL) ||
diff --git a/tests/gpg/t-thread-keylist.c b/tests/gpg/t-thread-keylist.c
index 14f7718..d585bf4 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))
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-gnupg/gpgme.git
More information about the Pkg-gnupg-commit
mailing list