/pidgin/main: 8b4a41b6fe60: Fix warnings in irc, msn and mxit pr...

Tomasz Wasilczyk tomkiewicz at cpw.pidgin.im
Sun Apr 14 15:45:17 EDT 2013


Changeset: 8b4a41b6fe607f86467fbd36d29e56e21280d0cd
Author:	 Tomasz Wasilczyk <tomkiewicz at cpw.pidgin.im>
Date:	 2013-04-14 21:45 +0200
Branch:	 default
URL: https://hg.pidgin.im/pidgin/main/rev/8b4a41b6fe60

Description:

Fix warnings in irc, msn and mxit protocols

diffstat:

 libpurple/protocols/irc/msgs.c    |  10 +++++-----
 libpurple/protocols/msn/slplink.c |   4 ++--
 libpurple/protocols/mxit/http.c   |   5 +++++
 3 files changed, 12 insertions(+), 7 deletions(-)

diffs (77 lines):

diff --git a/libpurple/protocols/irc/msgs.c b/libpurple/protocols/irc/msgs.c
--- a/libpurple/protocols/irc/msgs.c
+++ b/libpurple/protocols/irc/msgs.c
@@ -99,7 +99,7 @@ static void irc_connected(struct irc_con
 
 	/* If we're away then set our away message */
 	status = purple_account_get_active_status(irc->account);
-	if (purple_status_get_type(status) != PURPLE_STATUS_AVAILABLE) {
+	if (purple_status_type_get_primitive(purple_status_get_type(status)) != PURPLE_STATUS_AVAILABLE) {
 		PurplePluginProtocolInfo *prpl_info = PURPLE_PLUGIN_PROTOCOL_INFO(purple_connection_get_prpl(gc));
 		prpl_info->set_status(irc->account, status);
 	}
@@ -1650,22 +1650,22 @@ irc_msg_cap(struct irc_conn *irc, const 
 	irc->sasl_cb = g_new0(sasl_callback_t, 5);
 
 	irc->sasl_cb[id].id = SASL_CB_AUTHNAME;
-	irc->sasl_cb[id].proc = irc_sasl_cb_simple;
+	irc->sasl_cb[id].proc = (int (*)(void))irc_sasl_cb_simple; /* sasl_getsimple_t */
 	irc->sasl_cb[id].context = (void *)irc;
 	id++;
 
 	irc->sasl_cb[id].id = SASL_CB_USER;
-	irc->sasl_cb[id].proc = irc_sasl_cb_simple;
+	irc->sasl_cb[id].proc = (int (*)(void))irc_sasl_cb_simple; /* sasl_getsimple_t */
 	irc->sasl_cb[id].context = (void *)irc;
 	id++;
 
 	irc->sasl_cb[id].id = SASL_CB_PASS;
-	irc->sasl_cb[id].proc = irc_sasl_cb_secret;
+	irc->sasl_cb[id].proc = (int (*)(void))irc_sasl_cb_secret; /* sasl_getsecret_t */
 	irc->sasl_cb[id].context = (void *)irc;
 	id++;
 
 	irc->sasl_cb[id].id = SASL_CB_LOG;
-	irc->sasl_cb[id].proc = irc_sasl_cb_log;
+	irc->sasl_cb[id].proc = (int (*)(void))irc_sasl_cb_log; /* sasl_log_t */
 	irc->sasl_cb[id].context = (void *)irc;
 	id++;
 
diff --git a/libpurple/protocols/msn/slplink.c b/libpurple/protocols/msn/slplink.c
--- a/libpurple/protocols/msn/slplink.c
+++ b/libpurple/protocols/msn/slplink.c
@@ -546,8 +546,8 @@ slpmsg_add_part(MsnSlpMessage *slpmsg, M
 				|| (offset + part->size) > slpmsg->size
 				|| msn_p2p_info_get_offset(slpmsg->p2p_info) != offset) {
 			purple_debug_error("msn",
-				"Oversized slpmsg - msgsize=%lld offset=%" G_GUINT64_FORMAT " len=%" G_GSIZE_FORMAT "\n",
-				slpmsg->size, offset, part->size);
+				"Oversized slpmsg - msgsize=%" G_GSIZE_FORMAT " offset=%" G_GUINT64_FORMAT " len=%" G_GSIZE_FORMAT "\n",
+				(gsize)slpmsg->size, offset, (gsize)part->size);
 			g_return_if_reached();
 		} else {
 			memcpy(slpmsg->buffer + offset, part->buffer, part->size);
diff --git a/libpurple/protocols/mxit/http.c b/libpurple/protocols/mxit/http.c
--- a/libpurple/protocols/mxit/http.c
+++ b/libpurple/protocols/mxit/http.c
@@ -104,7 +104,9 @@ static void mxit_cb_http_read( gpointer 
 	int					len;
 	char*				tmp;
 	int					res;
+#if 0
 	char*				next;
+#endif
 
 	purple_debug_info( MXIT_PLUGIN_ID, "mxit_cb_http_read\n" );
 
@@ -188,7 +190,10 @@ static void mxit_cb_http_read( gpointer 
 		}
 		else if ( buflen > ( ( body - buf ) + bodylen ) ) {
 			/* we have a second packet here */
+#if 0
 			next = body + bodylen;
+#endif
+			purple_debug_warning(MXIT_PLUGIN_ID, "Recieved many packets at once\n");
 			session->rx_res = 0;
 		}
 		else {



More information about the Commits mailing list