[pkg-opensc-commit] [libp11] 165/239: Resolve trivial warnings

Eric Dorland eric at moszumanska.debian.org
Sat Oct 17 06:21:27 UTC 2015


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

eric pushed a commit to branch master
in repository libp11.

commit 935bb956c1433676c50069abc835f2f7634fa50c
Author: Alon Bar-Lev <alon.barlev at gmail.com>
Date:   Wed Dec 14 10:52:46 2011 +0000

    Resolve trivial warnings
---
 src/p11_attr.c | 2 +-
 src/p11_cert.c | 3 +++
 src/p11_key.c  | 3 +++
 src/p11_ops.c  | 8 +++++++-
 src/p11_rsa.c  | 3 +++
 src/p11_slot.c | 2 ++
 6 files changed, 19 insertions(+), 2 deletions(-)

diff --git a/src/p11_attr.c b/src/p11_attr.c
index 83f603b..ce64cda 100644
--- a/src/p11_attr.c
+++ b/src/p11_attr.c
@@ -124,7 +124,7 @@ void pkcs11_addattr_bool(CK_ATTRIBUTE_PTR ap, int type, int value)
 
 void pkcs11_addattr_s(CK_ATTRIBUTE_PTR ap, int type, const char *s)
 {
-	pkcs11_addattr(ap, type, s, s ? strlen(s) : 0); // RFC2279 string an unpadded string of CK_UTF8CHARs with no null-termination
+	pkcs11_addattr(ap, type, s, s ? strlen(s) : 0); /* RFC2279 string an unpadded string of CK_UTF8CHARs with no null-termination */
 }
 
 void pkcs11_addattr_bn(CK_ATTRIBUTE_PTR ap, int type, const BIGNUM * bn)
diff --git a/src/p11_cert.c b/src/p11_cert.c
index 157bc6b..3dcde82 100644
--- a/src/p11_cert.c
+++ b/src/p11_cert.c
@@ -141,6 +141,9 @@ static int pkcs11_init_cert(PKCS11_CTX * ctx, PKCS11_TOKEN * token,
 	CK_CERTIFICATE_TYPE cert_type;
 	size_t size;
 
+	(void)ctx;
+	(void)session;
+
 	size = sizeof(cert_type);
 	if (pkcs11_getattr_var(token, obj, CKA_CERTIFICATE_TYPE, &cert_type, &size))
 		return -1;
diff --git a/src/p11_key.c b/src/p11_key.c
index f9672fc..47ed71b 100644
--- a/src/p11_key.c
+++ b/src/p11_key.c
@@ -251,6 +251,9 @@ static int pkcs11_init_key(PKCS11_CTX * ctx, PKCS11_TOKEN * token,
 	PKCS11_KEY_ops *ops;
 	size_t size;
 
+	(void)ctx;
+	(void)session;
+
 	size = sizeof(key_type);
 	if (pkcs11_getattr_var(token, obj, CKA_KEY_TYPE, &key_type, &size))
 		return -1;
diff --git a/src/p11_ops.c b/src/p11_ops.c
index fb6ad8f..fd2b1b1 100644
--- a/src/p11_ops.c
+++ b/src/p11_ops.c
@@ -44,7 +44,7 @@ PKCS11_sign(int type, const unsigned char *m, unsigned int m_len,
 		}
 	} else {
 		ASN1_TYPE parameter = { V_ASN1_NULL, { NULL } };
- 		ASN1_STRING digest = { m_len, V_ASN1_OCTET_STRING, (unsigned char *)m };
+ 		ASN1_STRING digest = { m_len, V_ASN1_OCTET_STRING, (unsigned char *)m, 0 };
 		X509_ALGOR algor = { NULL, &parameter };
 		X509_SIG digest_info = { &algor, &digest };
 		int size;
@@ -183,6 +183,12 @@ int
 PKCS11_verify(int type, const unsigned char *m, unsigned int m_len,
 		  unsigned char *signature, unsigned int siglen, PKCS11_KEY * key)
 {
+	(void)type;
+	(void)m;
+	(void)m_len;
+	(void)signature;
+	(void)siglen;
+	(void)key;
 
 	/* PKCS11 calls go here */
 	PKCS11err(PKCS11_F_PKCS11_RSA_VERIFY, PKCS11_NOT_SUPPORTED);
diff --git a/src/p11_rsa.c b/src/p11_rsa.c
index fa36160..2d89e9a 100644
--- a/src/p11_rsa.c
+++ b/src/p11_rsa.c
@@ -85,6 +85,9 @@ static int pkcs11_get_rsa_private(PKCS11_KEY * key, EVP_PKEY * pk)
 
 static int pkcs11_get_rsa_public(PKCS11_KEY * key, EVP_PKEY * pk)
 {
+	(void)key;
+	(void)pk;
+
 	/* TBD */
 	return 0;
 /*	return pkcs11_get_rsa_private(key,pk);*/
diff --git a/src/p11_slot.c b/src/p11_slot.c
index 40b47f1..7115845 100644
--- a/src/p11_slot.c
+++ b/src/p11_slot.c
@@ -84,6 +84,8 @@ PKCS11_SLOT *PKCS11_find_token(PKCS11_CTX * ctx,  PKCS11_SLOT * slots, unsigned
 	PKCS11_TOKEN *tok;
 	unsigned int n;
 
+	(void)ctx;
+
 	if (! slots)
 		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