From 3c6cb82e674b2e23d85e36de69bb49f80207a9de Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Love=20H=C3=B6rnquist=20=C3=85strand?= Date: Mon, 8 May 2006 11:27:49 +0000 Subject: [PATCH] Less "pointer targets in passing argument differ in signedness" warnings. git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@17509 ec53bebd-3082-4978-b11e-865c3cabbd6b --- lib/des/rc2test.c | 10 +++++----- lib/des/rctest.c | 2 +- lib/krb5/aes-test.c | 9 +++++---- 3 files changed, 11 insertions(+), 10 deletions(-) diff --git a/lib/des/rc2test.c b/lib/des/rc2test.c index e10eace18..7015b8237 100644 --- a/lib/des/rc2test.c +++ b/lib/des/rc2test.c @@ -42,11 +42,11 @@ RCSID("$Id$"); #include struct { - const char *key; + const void *key; const int keylen; const int bitsize; - const char *plain; - const char *cipher; + const void *plain; + const void *cipher; } tests[] = { { "\x00\x00\x00\x00\x00\x00\x00\x00" @@ -103,12 +103,12 @@ struct { } }; -const char cbc_key[16] = +const unsigned char cbc_key[16] = "\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00"; const char cbc_iv[8] = "\x01\x01\x01\x01\x01\x01\x01\x01"; -const char cbc_in_data[32] = +const unsigned char cbc_in_data[32] = "\x20\x20\x20\x20\x20\x20\x20\x20" "\x20\x20\x20\x20\x20\x20\x20\x20" "\x20\x20\x20\x20\x20\x20\x20\x20" diff --git a/lib/des/rctest.c b/lib/des/rctest.c index 7d433d954..077f4aad2 100644 --- a/lib/des/rctest.c +++ b/lib/des/rctest.c @@ -144,7 +144,7 @@ const unsigned char cipher3[] = int main (void) { - char buf[1024]; + unsigned char buf[1024]; RC4_KEY key; RC4_set_key(&key, 8, key1); diff --git a/lib/krb5/aes-test.c b/lib/krb5/aes-test.c index 7e8b6f03d..9d4495d68 100644 --- a/lib/krb5/aes-test.c +++ b/lib/krb5/aes-test.c @@ -472,8 +472,9 @@ char *aes_key2 = static int -samep(int testn, char *type, const char *p1, const char *p2, size_t len) +samep(int testn, char *type, const void *pp1, const void *pp2, size_t len) { + const unsigned char *p1 = pp1, *p2 = pp2; size_t i; int val = 1; @@ -493,13 +494,13 @@ samep(int testn, char *type, const char *p1, const char *p2, size_t len) } static int -encryption_test(krb5_context context, char *key, size_t keylen, +encryption_test(krb5_context context, const void *key, size_t keylen, struct enc_test *enc, int numenc) { - char iv[AES_BLOCK_SIZE]; + unsigned char iv[AES_BLOCK_SIZE]; int i, val, failed = 0; AES_KEY ekey, dkey; - char *p; + unsigned char *p; AES_set_encrypt_key(key, keylen, &ekey); AES_set_decrypt_key(key, keylen, &dkey);