Skip Menu |
 

Subject: krb5-1.5: fix warnings in lib/crypto
warning fix for:
old_api_glue.c: In function 'krb5_encrypt':
old_api_glue.c:49: warning: assignment discards qualifiers from
pointer target type
old_api_glue.c: In function 'krb5_decrypt':
old_api_glue.c:85: warning: assignment discards qualifiers from
pointer target type
old_api_glue.c: In function 'krb5_calculate_checksum':
old_api_glue.c:206: warning: assignment discards qualifiers from
pointer target type
old_api_glue.c:210: warning: assignment discards qualifiers from
pointer target type
old_api_glue.c: In function 'krb5_verify_checksum':
old_api_glue.c:242: warning: assignment discards qualifiers from
pointer target type
old_api_glue.c:246: warning: assignment discards qualifiers from
pointer target type

pbkdf2.c:86: warning: pointer targets in assignment differ in
signedness

prng.c:33: warning: 'init_error' defined but not used
# warning fix for:
# old_api_glue.c: In function 'krb5_encrypt':
# old_api_glue.c:49: warning: assignment discards qualifiers from pointer target type
# old_api_glue.c: In function 'krb5_decrypt':
# old_api_glue.c:85: warning: assignment discards qualifiers from pointer target type
# old_api_glue.c: In function 'krb5_calculate_checksum':
# old_api_glue.c:206: warning: assignment discards qualifiers from pointer target type
# old_api_glue.c:210: warning: assignment discards qualifiers from pointer target type
# old_api_glue.c: In function 'krb5_verify_checksum':
# old_api_glue.c:242: warning: assignment discards qualifiers from pointer target type
# old_api_glue.c:246: warning: assignment discards qualifiers from pointer target type
#
# pbkdf2.c:86: warning: pointer targets in assignment differ in signedness
#
# prng.c:33: warning: 'init_error' defined but not used
#
--- lib/crypto/old_api_glue.c
+++ lib/crypto/old_api_glue.c 2006/06/21 10:23:07
@@ -46,7 +46,7 @@

/* size is the length of the input cleartext data */
inputd.length = size;
- inputd.data = inptr;
+ inputd.data = (char*)inptr;

/* The size of the output buffer isn't part of the old api. Not too
safe. So, we assume here that it's big enough. */
@@ -82,7 +82,7 @@
/* size is the length of the input ciphertext data */
inputd.enctype = eblock->key->enctype;
inputd.ciphertext.length = size;
- inputd.ciphertext.data = inptr;
+ inputd.ciphertext.data = (char*)inptr;

/* we don't really know how big this is, but the code tends to assume
that the output buffer size should be the same as the input
@@ -203,11 +203,11 @@
krb5_error_code ret;
krb5_checksum cksum;

- input.data = in;
+ input.data = (char*)in;
input.length = in_length;

key.length = seed_length;
- key.contents = seed;
+ key.contents = (krb5_octet*)seed;

if ((ret = krb5_c_make_checksum(context, ctype, &key, 0, &input, &cksum)))
return(ret);
@@ -239,11 +239,11 @@
krb5_error_code ret;
krb5_boolean valid;

- input.data = in;
+ input.data = (char*)in;
input.length = in_length;

key.length = seed_length;
- key.contents = seed;
+ key.contents = (krb5_octet*)seed;

if ((ret = krb5_c_verify_checksum(context, &key, 0, &input, cksum,
&valid)))
--- lib/crypto/pbkdf2.c
+++ lib/crypto/pbkdf2.c 2006/06/21 10:25:54
@@ -83,7 +83,7 @@
krb5_data out;
krb5_error_code err;

- pdata.contents = pass->data;
+ pdata.contents = (krb5_octet*) pass->data;
pdata.length = pass->length;

#if 0
--- lib/crypto/prng.c
+++ lib/crypto/prng.c 2006/06/21 10:27:07
@@ -30,7 +30,6 @@

#include "yarrow.h"
static Yarrow_CTX y_ctx;
-static int init_error;
#define yarrow_lock krb5int_yarrow_lock
k5_mutex_t yarrow_lock = K5_MUTEX_PARTIAL_INITIALIZER;