/pidgin/main: 029ab6fae0e6: Backport more warning fixes for prpl...

Tomasz Wasilczyk twasilczyk at pidgin.im
Tue May 6 08:58:56 EDT 2014


Changeset: 029ab6fae0e6da6a53fe30bf13ff8a4fc0cf77d9
Author:	 Tomasz Wasilczyk <twasilczyk at pidgin.im>
Date:	 2014-05-06 14:58 +0200
Branch:	 release-2.x.y
URL: https://hg.pidgin.im/pidgin/main/rev/029ab6fae0e6

Description:

Backport more warning fixes for prpls from default

diffstat:

 libpurple/protocols/bonjour/jabber.c        |   3 +-
 libpurple/protocols/mxit/http.c             |   8 ++++-
 libpurple/protocols/myspace/user.c          |   4 ++-
 libpurple/protocols/oscar/family_auth.c     |   3 +-
 libpurple/protocols/oscar/family_bart.c     |  12 +++----
 libpurple/protocols/oscar/family_chatnav.c  |   7 +---
 libpurple/protocols/oscar/family_icbm.c     |   3 +-
 libpurple/protocols/oscar/family_locate.c   |   3 +-
 libpurple/protocols/oscar/family_oservice.c |   3 ++
 libpurple/protocols/oscar/oscar.c           |  27 ++++++++----------
 libpurple/protocols/sametime/sametime.c     |  38 --------------------------
 libpurple/protocols/silc/ops.c              |   5 +--
 libpurple/protocols/silc/silc.c             |   2 +-
 libpurple/protocols/silc/wb.c               |   2 -
 libpurple/protocols/yahoo/libymsg.c         |  29 ++++----------------
 libpurple/protocols/yahoo/yahoo_filexfer.c  |  41 ++++------------------------
 libpurple/protocols/yahoo/yahoo_picture.c   |  10 +-----
 libpurple/protocols/yahoo/yahoochat.c       |  33 ++--------------------
 libpurple/protocols/zephyr/ZParseNot.c      |   3 ++
 19 files changed, 61 insertions(+), 175 deletions(-)

diffs (truncated from 756 to 300 lines):

diff --git a/libpurple/protocols/bonjour/jabber.c b/libpurple/protocols/bonjour/jabber.c
--- a/libpurple/protocols/bonjour/jabber.c
+++ b/libpurple/protocols/bonjour/jabber.c
@@ -149,7 +149,6 @@ static void
 	xmlnode *body_node, *html_node, *events_node;
 	PurpleConnection *gc = purple_account_get_connection(purple_buddy_get_account(pb));
 	gchar *body = NULL;
-	gboolean composing_event = FALSE;
 
 	body_node = xmlnode_get_child(message_node, "body");
 	html_node = xmlnode_get_child(message_node, "html");
@@ -161,8 +160,10 @@ static void
 
 	events_node = xmlnode_get_child_with_namespace(message_node, "x", "jabber:x:event");
 	if (events_node != NULL) {
+#if 0
 		if (xmlnode_get_child(events_node, "composing") != NULL)
 			composing_event = TRUE;
+#endif
 		if (xmlnode_get_child(events_node, "id") != NULL) {
 			/* The user is just typing */
 			/* TODO: Deal with typing notification */
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" );
 
@@ -123,7 +125,9 @@ static void mxit_cb_http_read( gpointer 
 		}
 		buf[buflen+len] = '\0';
 
-//nextpacket:
+#if 0
+nextpacket:
+#endif
 
 #ifdef	DEBUG_HTTP
 		purple_debug_info( MXIT_PLUGIN_ID, "HTTP POST READ 1: (%i)\n", len );
@@ -188,7 +192,9 @@ 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
 			session->rx_res = 0;
 		}
 		else {
diff --git a/libpurple/protocols/myspace/user.c b/libpurple/protocols/myspace/user.c
--- a/libpurple/protocols/myspace/user.c
+++ b/libpurple/protocols/myspace/user.c
@@ -619,14 +619,16 @@ static void msim_username_is_set_cb(Msim
 	MsimMessage *body;
 
 	guint rid;
-	gint cmd,dsn,uid,lid,code;
+	gint cmd,dsn,lid,code;
 	/* \persistr\\cmd\258\dsn\9\uid\204084363\lid\14\rid\369\body\UserName=TheAlbinoRhino1.Code=0\final\ */
 
 	purple_debug_info("msim","username_is_set made\n");
 
 	cmd = msim_msg_get_integer(userinfo, "cmd");
 	dsn = msim_msg_get_integer(userinfo, "dsn");
+#if 0
 	uid = msim_msg_get_integer(userinfo, "uid");
+#endif
 	lid = msim_msg_get_integer(userinfo, "lid");
 	body = msim_msg_get_dictionary(userinfo, "body");
 	errmsg = _("An error occurred while trying to set the username.  "
diff --git a/libpurple/protocols/oscar/family_auth.c b/libpurple/protocols/oscar/family_auth.c
--- a/libpurple/protocols/oscar/family_auth.c
+++ b/libpurple/protocols/oscar/family_auth.c
@@ -563,7 +563,6 @@ aim_auth_securid_send(OscarData *od, con
 {
 	FlapConnection *conn;
 	FlapFrame *frame;
-	aim_snacid_t snacid;
 	int len;
 
 	if (!od || !(conn = flap_connection_getbytype_all(od, SNAC_FAMILY_AUTH)) || !securid)
@@ -573,7 +572,7 @@ aim_auth_securid_send(OscarData *od, con
 
 	frame = flap_frame_new(od, 0x02, 10+2+len);
 
-	snacid = aim_cachesnac(od, SNAC_FAMILY_AUTH, SNAC_SUBTYPE_AUTH_SECURID_RESPONSE, 0x0000, NULL, 0);
+	/* aim_snacid_t snacid = */ aim_cachesnac(od, SNAC_FAMILY_AUTH, SNAC_SUBTYPE_AUTH_SECURID_RESPONSE, 0x0000, NULL, 0);
 	aim_putsnac(&frame->data, SNAC_FAMILY_AUTH, SNAC_SUBTYPE_AUTH_SECURID_RESPONSE, 0);
 
 	byte_stream_put16(&frame->data, len);
diff --git a/libpurple/protocols/oscar/family_bart.c b/libpurple/protocols/oscar/family_bart.c
--- a/libpurple/protocols/oscar/family_bart.c
+++ b/libpurple/protocols/oscar/family_bart.c
@@ -73,12 +73,10 @@ uploadack(OscarData *od, FlapConnection 
 {
 	int ret = 0;
 	aim_rxcallback_t userfunc;
-	guint16 something, somethingelse;
-	guint8 onemorething;
 
-	something = byte_stream_get16(bs);
-	somethingelse = byte_stream_get16(bs);
-	onemorething = byte_stream_get8(bs);
+	byte_stream_get16(bs);
+	byte_stream_get16(bs);
+	byte_stream_get8(bs);
 
 	if ((userfunc = aim_callhandler(od, snac->family, snac->subtype)))
 		ret = userfunc(od, conn, frame);
@@ -139,11 +137,11 @@ parseicon(OscarData *od, FlapConnection 
 	int ret = 0;
 	aim_rxcallback_t userfunc;
 	char *bn;
-	guint16 flags, iconlen;
+	guint16 iconlen;
 	guint8 iconcsumtype, iconcsumlen, *iconcsum, *icon;
 
 	bn = byte_stream_getstr(bs, byte_stream_get8(bs));
-	flags = byte_stream_get16(bs);
+	byte_stream_get16(bs); /* flags */
 	iconcsumtype = byte_stream_get8(bs);
 	iconcsumlen = byte_stream_get8(bs);
 	iconcsum = byte_stream_getraw(bs, iconcsumlen);
diff --git a/libpurple/protocols/oscar/family_chatnav.c b/libpurple/protocols/oscar/family_chatnav.c
--- a/libpurple/protocols/oscar/family_chatnav.c
+++ b/libpurple/protocols/oscar/family_chatnav.c
@@ -224,11 +224,8 @@ parseinfo_perms(OscarData *od, FlapConne
 		 * 2  Exchange creation allowed
 		 *
 		 */
-		if (aim_tlv_gettlv(innerlist, 0x00d5, 1)) {
-			guint8 createperms;
-
-			createperms = aim_tlv_get8(innerlist, 0x00d5, 1);
-		}
+		if (aim_tlv_gettlv(innerlist, 0x00d5, 1))
+			aim_tlv_get8(innerlist, 0x00d5, 1); /* createperms */
 
 		/*
 		 * Type 0x00d6: Character Set (First Time)
diff --git a/libpurple/protocols/oscar/family_icbm.c b/libpurple/protocols/oscar/family_icbm.c
--- a/libpurple/protocols/oscar/family_icbm.c
+++ b/libpurple/protocols/oscar/family_icbm.c
@@ -1807,13 +1807,12 @@ static int clientautoresp(OscarData *od,
  */
 static int msgack(OscarData *od, FlapConnection *conn, aim_module_t *mod, FlapFrame *frame, aim_modsnac_t *snac, ByteStream *bs)
 {
-	guint16 ch;
 	guchar *cookie;
 	char *bn;
 	int ret = 0;
 
 	cookie = byte_stream_getraw(bs, 8);
-	ch = byte_stream_get16(bs);
+	byte_stream_get16(bs); /* ch */
 	bn = byte_stream_getstr(bs, byte_stream_get8(bs));
 
 	purple_debug_info("oscar", "Sent message to %s.\n", bn);
diff --git a/libpurple/protocols/oscar/family_locate.c b/libpurple/protocols/oscar/family_locate.c
--- a/libpurple/protocols/oscar/family_locate.c
+++ b/libpurple/protocols/oscar/family_locate.c
@@ -958,8 +958,7 @@ aim_info_extract(OscarData *od, ByteStre
 			/*
 			 * My instance number.
 			 */
-			guint8 instance_number;
-			instance_number = byte_stream_get8(bs);
+			byte_stream_get8(bs);
 
 		} else if (type == 0x0019) {
 			/*
diff --git a/libpurple/protocols/oscar/family_oservice.c b/libpurple/protocols/oscar/family_oservice.c
--- a/libpurple/protocols/oscar/family_oservice.c
+++ b/libpurple/protocols/oscar/family_oservice.c
@@ -764,6 +764,9 @@ hostversions(OscarData *od, FlapConnecti
 
 	/* This is frivolous. (Thank you SmarterChild.) */
 	vercount = byte_stream_bytes_left(bs)/4;
+
+	/* XXX: vercount probably should be used for reading versions. */
+	(void)vercount;
 	versions = byte_stream_getraw(bs, byte_stream_bytes_left(bs));
 	g_free(versions);
 
diff --git a/libpurple/protocols/oscar/oscar.c b/libpurple/protocols/oscar/oscar.c
--- a/libpurple/protocols/oscar/oscar.c
+++ b/libpurple/protocols/oscar/oscar.c
@@ -2175,11 +2175,11 @@ static int purple_parse_misses(OscarData
 	PurpleAccount *account = purple_connection_get_account(gc);
 	char *buf;
 	va_list ap;
-	guint16 chan, nummissed, reason;
+	guint16 nummissed, reason;
 	aim_userinfo_t *userinfo;
 
 	va_start(ap, fr);
-	chan = (guint16)va_arg(ap, unsigned int);
+	va_arg(ap, unsigned int); /* guint16 chan */
 	userinfo = va_arg(ap, aim_userinfo_t *);
 	nummissed = (guint16)va_arg(ap, unsigned int);
 	reason = (guint16)va_arg(ap, unsigned int);
@@ -2654,12 +2654,12 @@ static int purple_icon_parseicon(OscarDa
 	PurpleConnection *gc = od->gc;
 	va_list ap;
 	char *bn;
-	guint8 iconcsumtype, *iconcsum, *icon;
+	guint8 *iconcsum, *icon;
 	guint16 iconcsumlen, iconlen;
 
 	va_start(ap, fr);
 	bn = va_arg(ap, char *);
-	iconcsumtype = va_arg(ap, int);
+	va_arg(ap, int); /* iconsumtype */
 	iconcsum = va_arg(ap, guint8 *);
 	iconcsumlen = va_arg(ap, int);
 	icon = va_arg(ap, guint8 *);
@@ -2964,14 +2964,13 @@ static int purple_popup(OscarData *od, F
 	gchar *text;
 	va_list ap;
 	char *msg, *url;
-	guint16 wid, hei, delay;
 
 	va_start(ap, fr);
 	msg = va_arg(ap, char *);
 	url = va_arg(ap, char *);
-	wid = (guint16) va_arg(ap, int);
-	hei = (guint16) va_arg(ap, int);
-	delay = (guint16) va_arg(ap, int);
+	va_arg(ap, int); /* guint16 wid */
+	va_arg(ap, int); /* guint16 hei */
+	va_arg(ap, int); /* guint16 delay */
 	va_end(ap);
 
 	text = g_strdup_printf("%s<br><a href=\"%s\">%s</a>", msg, url, url);
@@ -3882,8 +3881,6 @@ static int purple_ssi_parselist(OscarDat
 	guint32 tmp;
 	PurpleStoredImage *img;
 	va_list ap;
-	guint16 fmtver, numitems;
-	guint32 timestamp;
 	guint16 deny_entry_type = aim_ssi_getdenyentrytype(od);
 
 	gc = od->gc;
@@ -3891,9 +3888,9 @@ static int purple_ssi_parselist(OscarDat
 	account = purple_connection_get_account(gc);
 
 	va_start(ap, fr);
-	fmtver = (guint16)va_arg(ap, int);
-	numitems = (guint16)va_arg(ap, int);
-	timestamp = va_arg(ap, guint32);
+	va_arg(ap, int); /* guint16 fmtver */
+	va_arg(ap, int); /* guint16 numitems */
+	va_arg(ap, guint32); /* timestamp */
 	va_end(ap);
 
 	/* Don't attempt to re-request our buddy list later */
@@ -4276,14 +4273,14 @@ purple_ssi_parseaddmod(OscarData *od, Fl
 static int purple_ssi_authgiven(OscarData *od, FlapConnection *conn, FlapFrame *fr, ...) {
 	PurpleConnection *gc = od->gc;
 	va_list ap;
-	char *bn, *msg;
+	char *bn;
 	gchar *dialog_msg, *nombre;
 	struct name_data *data;
 	PurpleBuddy *buddy;
 
 	va_start(ap, fr);
 	bn = va_arg(ap, char *);
-	msg = va_arg(ap, char *);
+	va_arg(ap, char *); /* msg */
 	va_end(ap);
 
 	purple_debug_info("oscar",
diff --git a/libpurple/protocols/sametime/sametime.c b/libpurple/protocols/sametime/sametime.c
--- a/libpurple/protocols/sametime/sametime.c
+++ b/libpurple/protocols/sametime/sametime.c
@@ -1336,13 +1336,11 @@ static void blist_menu_nab(PurpleBlistNo
 static void blist_node_menu_cb(PurpleBlistNode *node,
                                GList **menu, struct mwPurplePluginData *pd) {
   const char *owner;
-  PurpleGroup *group;
   PurpleAccount *acct;
   PurpleMenuAction *act;
 
   /* we only want groups */
   if(! PURPLE_BLIST_NODE_IS_GROUP(node)) return;
-  group = (PurpleGroup *) node;
 
   acct = purple_connection_get_account(pd->gc);
   g_return_if_fail(acct != NULL);
@@ -2027,21 +2025,12 @@ static void mw_conf_closed(struct mwConf
 static void mw_conf_peer_joined(struct mwConference *conf,
 				struct mwLoginInfo *peer) {



More information about the Commits mailing list