changeset 11164:93663df88ec4

[gaim-migrate @ 13265] Get rid of the last of the gcc4 warnings in MSN. Rooaarrrrr committer: Tailor Script <tailor@pidgin.im>
author Mark Doliner <mark@kingant.net>
date Fri, 29 Jul 2005 01:38:12 +0000
parents 4cf257598691
children f20813369fe8
files src/protocols/msn/notification.c src/protocols/msn/slpcall.c src/protocols/msn/slplink.c src/protocols/msn/slpmsg.c src/protocols/msn/slpmsg.h src/protocols/msn/user.c
diffstat 6 files changed, 19 insertions(+), 17 deletions(-) [+]
line wrap: on
line diff
--- a/src/protocols/msn/notification.c	Fri Jul 29 01:22:06 2005 +0000
+++ b/src/protocols/msn/notification.c	Fri Jul 29 01:38:12 2005 +0000
@@ -411,12 +411,12 @@
 	cipher = gaim_ciphers_find_cipher("md5");
 	context = gaim_cipher_context_new(cipher, NULL);
 
-	gaim_cipher_context_append(context, cmd->params[1],
+	gaim_cipher_context_append(context, (const guint8 *)cmd->params[1],
 							   strlen(cmd->params[1]));
 
 	challenge_resp = "VT6PX?UQTM4WM%YR";
 
-	gaim_cipher_context_append(context, challenge_resp,
+	gaim_cipher_context_append(context, (const guint8 *)challenge_resp,
 							   strlen(challenge_resp));
 	gaim_cipher_context_digest(context, sizeof(digest), digest, NULL);
 	gaim_cipher_context_destroy(context);
@@ -921,7 +921,7 @@
 	GaimCipherContext *context;
 	guint8 digest[16];
 	FILE *fd;
-	char buf[2048];
+	char *buf;
 	char buf2[3];
 	char sendbuf[64];
 	int i;
@@ -932,7 +932,7 @@
 	rru = cmd->params[1];
 	url = cmd->params[2];
 
-	g_snprintf(buf, sizeof(buf), "%s%lu%s",
+	buf = g_strdup_printf("%s%lu%s",
 			   session->passport_info.mspauth,
 			   time(NULL) - session->passport_info.sl,
 			   gaim_connection_get_password(account->gc));
@@ -940,10 +940,12 @@
 	cipher = gaim_ciphers_find_cipher("md5");
 	context = gaim_cipher_context_new(cipher, NULL);
 
-	gaim_cipher_context_append(context, buf, strlen(buf));
+	gaim_cipher_context_append(context, (const guint8 *)buf, strlen(buf));
 	gaim_cipher_context_digest(context, sizeof(digest), digest, NULL);
 	gaim_cipher_context_destroy(context);
 
+	g_free(buf);
+
 	memset(sendbuf, 0, sizeof(sendbuf));
 
 	for (i = 0; i < 16; i++)
--- a/src/protocols/msn/slpcall.c	Fri Jul 29 01:22:06 2005 +0000
+++ b/src/protocols/msn/slpcall.c	Fri Jul 29 01:38:12 2005 +0000
@@ -221,7 +221,7 @@
 msn_slp_process_msg(MsnSlpLink *slplink, MsnSlpMessage *slpmsg)
 {
 	MsnSlpCall *slpcall;
-	const char *body;
+	const guchar *body;
 	gsize body_len;
 
 	slpcall = NULL;
@@ -230,7 +230,7 @@
 
 	if (slpmsg->flags == 0x0)
 	{
-		slpcall = msn_slp_sip_recv(slplink, body, body_len);
+		slpcall = msn_slp_sip_recv(slplink, (const char *)body, body_len);
 	}
 	else if (slpmsg->flags == 0x20 || slpmsg->flags == 0x1000030)
 	{
--- a/src/protocols/msn/slplink.c	Fri Jul 29 01:22:06 2005 +0000
+++ b/src/protocols/msn/slplink.c	Fri Jul 29 01:38:12 2005 +0000
@@ -664,7 +664,7 @@
 
 #define MAX_FILE_NAME_LEN 0x226
 
-static unsigned char *
+static char *
 gen_context(const char *file_name, const char *file_path)
 {
 	struct stat st;
@@ -765,14 +765,14 @@
 						   const MsnObject *obj)
 {
 	MsnSlpCall *slpcall;
-	unsigned char *msnobj_data;
-	unsigned char *msnobj_base64;
+	char *msnobj_data;
+	char *msnobj_base64;
 
 	g_return_if_fail(slplink != NULL);
 	g_return_if_fail(obj     != NULL);
 
 	msnobj_data = msn_object_to_string(obj);
-	msnobj_base64 = gaim_base64_encode(msnobj_data, strlen(msnobj_data));
+	msnobj_base64 = gaim_base64_encode((const guchar *)msnobj_data, strlen(msnobj_data));
 	g_free(msnobj_data);
 
 	slpcall = msn_slp_call_new(slplink);
--- a/src/protocols/msn/slpmsg.c	Fri Jul 29 01:22:06 2005 +0000
+++ b/src/protocols/msn/slpmsg.c	Fri Jul 29 01:38:12 2005 +0000
@@ -104,7 +104,7 @@
 	if (body != NULL)
 		slpmsg->buffer = g_memdup(body, size);
 	else
-		slpmsg->buffer = g_new0(char, size);
+		slpmsg->buffer = g_new0(guchar, size);
 
 	slpmsg->size = size;
 }
--- a/src/protocols/msn/slpmsg.h	Fri Jul 29 01:22:06 2005 +0000
+++ b/src/protocols/msn/slpmsg.h	Fri Jul 29 01:38:12 2005 +0000
@@ -57,7 +57,7 @@
 	long flags;
 
 	FILE *fp;
-	char *buffer;
+	guchar *buffer;
 	long long offset;
 	long long size;
 
--- a/src/protocols/msn/user.c	Fri Jul 29 01:22:06 2005 +0000
+++ b/src/protocols/msn/user.c	Fri Jul 29 01:38:12 2005 +0000
@@ -177,9 +177,9 @@
 	else if ((fp = g_fopen(filename, "rb")) != NULL)
 	{
 		GaimCipherContext *ctx;
-		unsigned char *buf;
+		char *buf;
 		gsize len;
-		unsigned char *base64;
+		char *base64;
 		unsigned char digest[20];
 
 		if (msnobj == NULL)
@@ -204,7 +204,7 @@
 		memset(digest, 0, sizeof(digest));
 
 		ctx = gaim_cipher_context_new_by_name("sha1", NULL);
-		gaim_cipher_context_append(ctx, buf, st.st_size);
+		gaim_cipher_context_append(ctx, (const guint8 *)buf, st.st_size);
 		gaim_cipher_context_digest(ctx, sizeof(digest), digest, NULL);
 		g_free(buf);
 
@@ -227,7 +227,7 @@
 		memset(digest, 0, sizeof(digest));
 
 		gaim_cipher_context_reset(ctx, NULL);
-		gaim_cipher_context_append(ctx, buf, strlen(buf));
+		gaim_cipher_context_append(ctx, (const guint8 *)buf, strlen(buf));
 		gaim_cipher_context_digest(ctx, sizeof(digest), digest, NULL);
 		gaim_cipher_context_destroy(ctx);
 		g_free(buf);