[pkg-opensc-commit] [libp11] 50/86: Squashed some compiler warnings

Eric Dorland eric at moszumanska.debian.org
Sun Jul 24 21:40:21 UTC 2016


This is an automated email from the git hooks/post-receive script.

eric pushed a commit to branch master
in repository libp11.

commit b40fe7dc690ed744a5cb0383875528b05b4bb163
Author: Michał Trojnara <Michal.Trojnara at stunnel.org>
Date:   Mon Feb 15 10:39:23 2016 +0100

    Squashed some compiler warnings
---
 examples/decrypt.c | 9 ++++-----
 src/p11_load.c     | 2 +-
 2 files changed, 5 insertions(+), 6 deletions(-)

diff --git a/examples/decrypt.c b/examples/decrypt.c
index 57ddc6b..a4b12cf 100644
--- a/examples/decrypt.c
+++ b/examples/decrypt.c
@@ -36,6 +36,9 @@ int main(int argc, char *argv[])
 	int rc = 0, fd, len;
 	unsigned int nslots, ncerts;
 
+	/* get password */
+	struct termios old, new;
+
 	if (argc != 2) {
 		fprintf(stderr, "usage: auth /usr/lib/opensc-pkcs11.so\n");
 		return 1;
@@ -152,9 +155,6 @@ int main(int argc, char *argv[])
 	if (!slot->token->loginRequired)
 		goto loggedin;
 
-	/* get password */
-	struct termios old, new;
-
 	/* Turn echoing off and fail if we can't. */
 	if (tcgetattr(0, &old) != 0)
 		goto failed;
@@ -231,8 +231,7 @@ loggedin:
 
 	CRYPTO_cleanup_all_ex_data();
 	ERR_free_strings();
-/* TODO fix this */
-//	ERR_remove_state(0);
+	ERR_remove_thread_state(NULL);
 
 	printf("decryption successfull.\n");
 	return 0;
diff --git a/src/p11_load.c b/src/p11_load.c
index 45d2f7a..b5df857 100644
--- a/src/p11_load.c
+++ b/src/p11_load.c
@@ -43,7 +43,7 @@ PKCS11_CTX *pkcs11_CTX_new(void)
 	cpriv->lockid = pkcs11_get_new_dynlockid();
 
 	return ctx;
- fail:
+fail:
 	OPENSSL_free(cpriv);
 	OPENSSL_free(ctx);
 	return NULL;

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-opensc/libp11.git



More information about the pkg-opensc-commit mailing list