[pkg-opensc-commit] [libp11] 167/239: Fix warnings, integer sign related
Eric Dorland
eric at moszumanska.debian.org
Sat Oct 17 06:21:28 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 59a7ce4aaca55884f0ec02356c2d3d952b890178
Author: Alon Bar-Lev <alon.barlev at gmail.com>
Date: Wed Dec 14 11:04:11 2011 +0000
Fix warnings, integer sign related
---
src/p11_attr.c | 2 +-
src/p11_ops.c | 4 ++--
src/p11_slot.c | 2 +-
3 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/src/p11_attr.c b/src/p11_attr.c
index 98d29c0..7db82a5 100644
--- a/src/p11_attr.c
+++ b/src/p11_attr.c
@@ -136,7 +136,7 @@ void pkcs11_addattr_bn(CK_ATTRIBUTE_PTR ap, int type, const BIGNUM * bn)
unsigned char temp[1024];
unsigned int n;
- assert(BN_num_bytes(bn) <= sizeof(temp));
+ assert((size_t)BN_num_bytes(bn) <= sizeof(temp));
n = BN_bn2bin(bn, temp);
pkcs11_addattr(ap, type, temp, n);
}
diff --git a/src/p11_ops.c b/src/p11_ops.c
index fd2b1b1..821094e 100644
--- a/src/p11_ops.c
+++ b/src/p11_ops.c
@@ -39,7 +39,7 @@ PKCS11_sign(int type, const unsigned char *m, unsigned int m_len,
if (ssl) {
if((m_len != 36) /* SHA1 + MD5 */ ||
- ((m_len + RSA_PKCS1_PADDING_SIZE) > sigsize)) {
+ ((m_len + RSA_PKCS1_PADDING_SIZE) > (unsigned)sigsize)) {
return(0); /* the size is wrong */
}
} else {
@@ -132,7 +132,7 @@ PKCS11_private_encrypt(int flen, const unsigned char *from, unsigned char *to,
return -1;
}
- if (sigsize != ck_sigsize)
+ if ((unsigned)sigsize != ck_sigsize)
return -1;
return sigsize;
diff --git a/src/p11_slot.c b/src/p11_slot.c
index 7115845..7e0d88b 100644
--- a/src/p11_slot.c
+++ b/src/p11_slot.c
@@ -330,7 +330,7 @@ static int pkcs11_init_slot(PKCS11_CTX * ctx, PKCS11_SLOT * slot, CK_SLOT_ID id)
void PKCS11_release_all_slots(PKCS11_CTX * ctx, PKCS11_SLOT *slots, unsigned int nslots)
{
- int i;
+ unsigned int i;
for (i=0; i < nslots; i++)
pkcs11_release_slot(ctx, &slots[i]);
--
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