From: hniksic Date: Thu, 29 Nov 2001 18:48:43 +0000 (-0800) Subject: [svn] Remove char/unsigned char warnings emitted by Sun cc. X-Git-Tag: v1.13~1997 X-Git-Url: http://sjero.net/git/?p=wget;a=commitdiff_plain;h=b65661a8799dde56661aa40c4e59a6d8213d521b [svn] Remove char/unsigned char warnings emitted by Sun cc. --- diff --git a/src/ChangeLog b/src/ChangeLog index 630ef7e2..3c6bff9a 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,8 @@ +2001-11-29 Hrvoje Niksic + + * gen-md5.c: Use unsigned char * as the buffer argument to + gen_md5_update. + 2001-11-29 Hrvoje Niksic * connect.h: Declare select_fd. diff --git a/src/ftp-opie.c b/src/ftp-opie.c index 39c90986..3ac33de9 100644 --- a/src/ftp-opie.c +++ b/src/ftp-opie.c @@ -2160,7 +2160,7 @@ calculate_skey_response (int sequence, const char *seed, const char *pass) strcat (feed, pass); gen_md5_init (ctx); - gen_md5_update (feed, strlen (feed), ctx); + gen_md5_update ((unsigned char *)feed, strlen (feed), ctx); gen_md5_finish (ctx, (unsigned char *)results); results[0] ^= results[2]; @@ -2170,7 +2170,7 @@ calculate_skey_response (int sequence, const char *seed, const char *pass) while (0 < sequence--) { gen_md5_init (ctx); - gen_md5_update (key, 8, ctx); + gen_md5_update ((unsigned char *)key, 8, ctx); gen_md5_finish (ctx, (unsigned char *)results); results[0] ^= results[2]; results[1] ^= results[3]; diff --git a/src/gen-md5.c b/src/gen-md5.c index 02bd479f..101d4585 100644 --- a/src/gen-md5.c +++ b/src/gen-md5.c @@ -81,7 +81,7 @@ gen_md5_update (unsigned const char *buffer, int len, gen_md5_context *ctx) #endif #ifdef HAVE_SOLARIS_MD5 - MD5Update (ctx_imp, buffer, len); + MD5Update (ctx_imp, (unsigned char *)buffer, len); #endif #ifdef HAVE_OPENSSL_MD5 diff --git a/src/host.c b/src/host.c index bbb1a101..e1c17011 100644 --- a/src/host.c +++ b/src/host.c @@ -217,7 +217,7 @@ lookup_host (const char *host, int silent) addr = (unsigned long)inet_addr (host); if ((int)addr != -1) { - unsigned char tmpstore[IP4_ADDRESS_LENGTH]; + char tmpstore[IP4_ADDRESS_LENGTH]; char *lst[] = { tmpstore, NULL }; /* ADDR is defined to be in network byte order, which is what diff --git a/src/http.c b/src/http.c index 2eae2f19..9043527a 100644 --- a/src/http.c +++ b/src/http.c @@ -2243,28 +2243,28 @@ digest_authentication_encode (const char *au, const char *user, /* A1BUF = H(user ":" realm ":" password) */ gen_md5_init (ctx); - gen_md5_update (user, strlen (user), ctx); - gen_md5_update (":", 1, ctx); - gen_md5_update (realm, strlen (realm), ctx); - gen_md5_update (":", 1, ctx); - gen_md5_update (passwd, strlen (passwd), ctx); + gen_md5_update ((unsigned char *)user, strlen (user), ctx); + gen_md5_update ((unsigned char *)":", 1, ctx); + gen_md5_update ((unsigned char *)realm, strlen (realm), ctx); + gen_md5_update ((unsigned char *)":", 1, ctx); + gen_md5_update ((unsigned char *)passwd, strlen (passwd), ctx); gen_md5_finish (ctx, hash); dump_hash (a1buf, hash); /* A2BUF = H(method ":" path) */ gen_md5_init (ctx); - gen_md5_update (method, strlen (method), ctx); - gen_md5_update (":", 1, ctx); - gen_md5_update (path, strlen (path), ctx); + gen_md5_update ((unsigned char *)method, strlen (method), ctx); + gen_md5_update ((unsigned char *)":", 1, ctx); + gen_md5_update ((unsigned char *)path, strlen (path), ctx); gen_md5_finish (ctx, hash); dump_hash (a2buf, hash); /* RESPONSE_DIGEST = H(A1BUF ":" nonce ":" A2BUF) */ gen_md5_init (ctx); gen_md5_update (a1buf, MD5_HASHLEN * 2, ctx); - gen_md5_update (":", 1, ctx); - gen_md5_update (nonce, strlen (nonce), ctx); - gen_md5_update (":", 1, ctx); + gen_md5_update ((unsigned char *)":", 1, ctx); + gen_md5_update ((unsigned char *)nonce, strlen (nonce), ctx); + gen_md5_update ((unsigned char *)":", 1, ctx); gen_md5_update (a2buf, MD5_HASHLEN * 2, ctx); gen_md5_finish (ctx, hash); dump_hash (response_digest, hash); diff --git a/src/utils.c b/src/utils.c index e93846cb..18015b07 100644 --- a/src/utils.c +++ b/src/utils.c @@ -1788,7 +1788,7 @@ debug_test_md5 (char *buf) ALLOCA_MD5_CONTEXT (ctx); gen_md5_init (ctx); - gen_md5_update (buf, strlen (buf), ctx); + gen_md5_update ((unsigned char *)buf, strlen (buf), ctx); gen_md5_finish (ctx, raw); p1 = raw;