changeset 11163:4cf257598691

[gaim-migrate @ 13264] Get rid of the last of the gcc4 warnings in jabber committer: Tailor Script <tailor@pidgin.im>
author Mark Doliner <mark@kingant.net>
date Fri, 29 Jul 2005 01:22:06 +0000
parents ccb38cf22483
children 93663df88ec4
files src/protocols/jabber/auth.c
diffstat 1 files changed, 6 insertions(+), 7 deletions(-) [+]
line wrap: on
line diff
--- a/src/protocols/jabber/auth.c	Fri Jul 29 01:14:23 2005 +0000
+++ b/src/protocols/jabber/auth.c	Fri Jul 29 01:22:06 2005 +0000
@@ -298,7 +298,7 @@
 	return ret;
 }
 
-static unsigned char*
+static char *
 generate_response_value(JabberID *jid, const char *passwd, const char *nonce,
 		const char *cnonce, const char *a2, const char *realm)
 {
@@ -307,8 +307,7 @@
 	guchar result[16];
 	size_t a1len;
 
-	unsigned char *x, *a1, *kd, *convnode, *convpasswd;
-	gchar *ha1, *ha2, *z;
+	gchar *a1, *convnode, *convpasswd, *ha1, *ha2, *kd, *x, *z;
 
 	if((convnode = g_convert(jid->node, strlen(jid->node), "iso-8859-1", "utf-8",
 					NULL, NULL, NULL)) == NULL) {
@@ -323,7 +322,7 @@
 	context = gaim_cipher_context_new(cipher, NULL);
 
 	x = g_strdup_printf("%s:%s:%s", convnode, realm, convpasswd);
-	gaim_cipher_context_append(context, x, strlen(x));
+	gaim_cipher_context_append(context, (const guint8 *)x, strlen(x));
 	gaim_cipher_context_digest(context, sizeof(result), result, NULL);
 
 	a1 = g_strdup_printf("xxxxxxxxxxxxxxxx:%s:%s", nonce, cnonce);
@@ -331,13 +330,13 @@
 	g_memmove(a1, result, 16);
 
 	gaim_cipher_context_reset(context, NULL);
-	gaim_cipher_context_append(context, a1, a1len);
+	gaim_cipher_context_append(context, (const guint8 *)a1, a1len);
 	gaim_cipher_context_digest(context, sizeof(result), result, NULL);
 
 	ha1 = gaim_base16_encode(result, 16);
 
 	gaim_cipher_context_reset(context, NULL);
-	gaim_cipher_context_append(context, a2, strlen(a2));
+	gaim_cipher_context_append(context, (const guint8 *)a2, strlen(a2));
 	gaim_cipher_context_digest(context, sizeof(result), result, NULL);
 
 	ha2 = gaim_base16_encode(result, 16);
@@ -345,7 +344,7 @@
 	kd = g_strdup_printf("%s:%s:00000001:%s:auth:%s", ha1, nonce, cnonce, ha2);
 
 	gaim_cipher_context_reset(context, NULL);
-	gaim_cipher_context_append(context, kd, strlen(kd));
+	gaim_cipher_context_append(context, (const guint8 *)kd, strlen(kd));
 	gaim_cipher_context_digest(context, sizeof(result), result, NULL);
 	gaim_cipher_context_destroy(context);