From c063224d29baffbf6a8aa2fd12eb52867ab35795 Mon Sep 17 00:00:00 2001 From: Sam Hartman Date: Thu, 4 Dec 2008 15:48:18 +0000 Subject: [PATCH] Cleanup warnings ticket: 6274 status: open git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@21280 dc483132-0cff-0310-8789-dd5450dbe970 --- src/lib/crypto/aead.c | 14 +++++++------- src/lib/crypto/arcfour/arcfour_aead.c | 2 +- src/lib/crypto/crypto_length.c | 4 ++-- src/lib/crypto/dk/dk_aead.c | 18 +++++++++--------- 4 files changed, 19 insertions(+), 19 deletions(-) diff --git a/src/lib/crypto/aead.c b/src/lib/crypto/aead.c index 15aeb0c49..4debc984e 100644 --- a/src/lib/crypto/aead.c +++ b/src/lib/crypto/aead.c @@ -357,7 +357,7 @@ krb5int_c_iov_decrypt_stream(const struct krb5_aead_provider *aead, size_t num_data) { krb5_error_code ret; - size_t header_len, trailer_len, padding_len; + unsigned int header_len, trailer_len, padding_len; krb5_crypto_iov *iov; krb5_crypto_iov *stream; size_t i, j; @@ -461,9 +461,9 @@ krb5int_c_encrypt_aead_compat(const struct krb5_aead_provider *aead, { krb5_crypto_iov iov[4]; krb5_error_code ret; - size_t header_len = 0; - size_t padding_len = 0; - size_t trailer_len = 0; + unsigned int header_len = 0; + unsigned int padding_len = 0; + unsigned int trailer_len = 0; ret = aead->crypto_length(aead, enc, hash, KRB5_CRYPTO_TYPE_HEADER, &header_len); @@ -551,9 +551,9 @@ krb5int_c_encrypt_length_aead_compat(const struct krb5_aead_provider *aead, const struct krb5_hash_provider *hash, size_t inputlen, size_t *length) { - size_t header_len = 0; - size_t padding_len = 0; - size_t trailer_len = 0; + unsigned int header_len = 0; + unsigned int padding_len = 0; + unsigned int trailer_len = 0; aead->crypto_length(aead, enc, hash, KRB5_CRYPTO_TYPE_HEADER, &header_len); krb5int_c_padding_length(aead, enc, hash, inputlen, &padding_len); diff --git a/src/lib/crypto/arcfour/arcfour_aead.c b/src/lib/crypto/arcfour/arcfour_aead.c index 40151d96b..af4852423 100644 --- a/src/lib/crypto/arcfour/arcfour_aead.c +++ b/src/lib/crypto/arcfour/arcfour_aead.c @@ -37,7 +37,7 @@ krb5int_arcfour_crypto_length(const struct krb5_aead_provider *aead, const struct krb5_enc_provider *enc, const struct krb5_hash_provider *hash, krb5_cryptotype type, - size_t *length) + unsigned int *length) { switch (type) { case KRB5_CRYPTO_TYPE_HEADER: diff --git a/src/lib/crypto/crypto_length.c b/src/lib/crypto/crypto_length.c index f3930d6d3..d99d18b27 100644 --- a/src/lib/crypto/crypto_length.c +++ b/src/lib/crypto/crypto_length.c @@ -105,7 +105,7 @@ krb5_c_crypto_length_iov(krb5_context context, krb5_error_code ret = 0; size_t i; const struct krb5_keytypes *ktp = NULL; - size_t data_length = 0, pad_length; + unsigned int data_length = 0, pad_length; krb5_crypto_iov *padding = NULL; /* @@ -113,7 +113,7 @@ krb5_c_crypto_length_iov(krb5_context context, * report variable header lengths */ - for (i = 0; i < krb5_enctypes_length; i++) { + for (i = 0; i < (size_t)krb5_enctypes_length; i++) { if (krb5_enctypes_list[i].etype == enctype) { ktp = &krb5_enctypes_list[i]; break; diff --git a/src/lib/crypto/dk/dk_aead.c b/src/lib/crypto/dk/dk_aead.c index 839b13344..ef40700e1 100644 --- a/src/lib/crypto/dk/dk_aead.c +++ b/src/lib/crypto/dk/dk_aead.c @@ -38,7 +38,7 @@ krb5int_dk_crypto_length(const struct krb5_aead_provider *aead, const struct krb5_enc_provider *enc, const struct krb5_hash_provider *hash, krb5_cryptotype type, - size_t *length) + unsigned int *length) { switch (type) { case KRB5_CRYPTO_TYPE_HEADER: @@ -73,10 +73,10 @@ krb5int_dk_encrypt_iov(const struct krb5_aead_provider *aead, krb5_crypto_iov *header, *trailer, *padding; krb5_keyblock ke, ki; size_t i; - size_t blocksize = 0; - size_t plainlen = 0; - size_t hmacsize = 0; - size_t padsize = 0; + unsigned int blocksize = 0; + unsigned int plainlen = 0; + unsigned int hmacsize = 0; + unsigned int padsize = 0; unsigned char *cksum = NULL; ke.contents = ki.contents = NULL; @@ -225,9 +225,9 @@ krb5int_dk_decrypt_iov(const struct krb5_aead_provider *aead, krb5_crypto_iov *header, *trailer; krb5_keyblock ke, ki; size_t i; - size_t blocksize = 0; /* careful, this is enc block size not confounder len */ - size_t cipherlen = 0; - size_t hmacsize = 0; + unsigned int blocksize = 0; /* careful, this is enc block size not confounder len */ + unsigned int cipherlen = 0; + unsigned int hmacsize = 0; unsigned char *cksum = NULL; ke.contents = ki.contents = NULL; @@ -358,7 +358,7 @@ krb5int_aes_crypto_length(const struct krb5_aead_provider *aead, const struct krb5_enc_provider *enc, const struct krb5_hash_provider *hash, krb5_cryptotype type, - size_t *length) + unsigned int *length) { switch (type) { case KRB5_CRYPTO_TYPE_HEADER: -- 2.26.2