diff libpurple/protocols/msn/msn.c @ 22798:05cb3f04c01e

This cleans up a bunch of warnings that stem from the fact that size_t and gsize have different sizes on different platforms.
author John Bailey <rekkanoryo@rekkanoryo.org>
date Sat, 03 May 2008 02:12:26 +0000
parents 6aa076a2ea6f
children 8c3444f04709 ac567757d236 d756a0477c06 1dd0e007514d
line wrap: on
line diff
--- a/libpurple/protocols/msn/msn.c	Fri May 02 23:16:11 2008 +0000
+++ b/libpurple/protocols/msn/msn.c	Sat May 03 02:12:26 2008 +0000
@@ -239,7 +239,7 @@
 	MsnUser *user;
 	char *payload = NULL;
 	const char *mobile_number = NULL;
-	size_t payload_len;
+	gsize payload_len;
 
 	session = gc->proto_data;
 	cmdproc = session->notification->cmdproc;
@@ -254,13 +254,13 @@
 		mobile_number[0] == '+') {
 		/* if msn_user_get_mobile_phone() has a + in front, it's a number
 		   that from the buddy's contact card */
-		trans = msn_transaction_new(cmdproc, "PGD", "tel:%s 1 %d",
+		trans = msn_transaction_new(cmdproc, "PGD", "tel:%s 1 %" G_GSIZE_FORMAT,
 			mobile_number, payload_len);
 	} else {
 		/* otherwise we send to whatever phone number the buddy registered
 		   with msn */
-		trans = msn_transaction_new(cmdproc, "PGD", "%s 1 %d", who,
-			payload_len);
+		trans = msn_transaction_new(cmdproc, "PGD", "%s 1 %" G_GSIZE_FORMAT,
+			who, payload_len);
 	}
 
 	msn_transaction_set_payload(trans, payload, payload_len);
@@ -2071,7 +2071,7 @@
 
 static void
 msn_got_photo(PurpleUtilFetchUrlData *url_data, gpointer user_data,
-		const gchar *url_text, size_t len, const gchar *error_message)
+		const gchar *url_text, gsize len, const gchar *error_message)
 {
 	MsnGetInfoStepTwoData *info2_data = (MsnGetInfoStepTwoData *)user_data;
 	int id = -1;
@@ -2113,7 +2113,7 @@
 		else
 		{
 			char buf[1024];
-			purple_debug_info("msn", "%s is %d bytes\n", photo_url_text, len);
+			purple_debug_info("msn", "%s is %" G_GSIZE_FORMAT " bytes\n", photo_url_text, len);
 			id = purple_imgstore_add_with_id(g_memdup(url_text, len), len, NULL);
 			g_snprintf(buf, sizeof(buf), "<img id=\"%d\"><br>", id);
 			purple_notify_user_info_prepend_pair(user_info, NULL, buf);