Cleanup warnings
authorSam Hartman <hartmans@mit.edu>
Thu, 4 Dec 2008 15:48:18 +0000 (15:48 +0000)
committerSam Hartman <hartmans@mit.edu>
Thu, 4 Dec 2008 15:48:18 +0000 (15:48 +0000)
ticket: 6274
status: open

git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@21280 dc483132-0cff-0310-8789-dd5450dbe970

src/lib/crypto/aead.c
src/lib/crypto/arcfour/arcfour_aead.c
src/lib/crypto/crypto_length.c
src/lib/crypto/dk/dk_aead.c

index 15aeb0c49215f1af0233d166bec122ce7b27c53a..4debc984e66897b89420164b54d056a05006d153 100644 (file)
@@ -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);
index 40151d96bef2985525707d3b23883e21a1722cc3..af485242325ff50c29f10f189b8de1f74c377f55 100644 (file)
@@ -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:
index f3930d6d3328012594af7dd3406027572e535bbc..d99d18b27649d78c173586250f9fa7c640ce28c9 100644 (file)
@@ -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;
index 839b13344e2a485d9a05dc4f7364d618e109b903..ef40700e155f3e0c224b7f47077beddd5b20ba55 100644 (file)
@@ -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: