Index: protocols/msn/sb.c
===================================================================
--- protocols/msn/sb.c	(revision df98ee8b4abaa890a02e706d69b93724e8f7744d)
+++ protocols/msn/sb.c	(revision b041b521c8b347c4660b0920f17b92b9c1484f49)
@@ -308,5 +308,4 @@
 	struct msn_switchboard *sb = data;
 	struct im_connection *ic;
-	struct msn_data *md;
 	char buf[1024];
 	
@@ -316,5 +315,4 @@
 	
 	ic = sb->ic;
-	md = ic->proto_data;
 	
 	if( source != sb->fd )
@@ -675,5 +673,4 @@
 	struct im_connection *ic = sb->ic;
 	char *body;
-	int blen = 0;
 	
 	if( !num_parts )
@@ -681,8 +678,5 @@
 	
 	if( ( body = strstr( msg, "\r\n\r\n" ) ) )
-	{
 		body += 4;
-		blen = msglen - ( body - msg );
-	}
 	
 	if( strcmp( cmd[0], "MSG" ) == 0 )
Index: protocols/msn/soap.c
===================================================================
--- protocols/msn/soap.c	(revision df98ee8b4abaa890a02e706d69b93724e8f7744d)
+++ protocols/msn/soap.c	(revision b041b521c8b347c4660b0920f17b92b9c1484f49)
@@ -210,5 +210,4 @@
 {
 	char *s;
-	int st;
 	
 	if( !getenv( "BITLBEE_DEBUG" ) )
@@ -218,7 +217,7 @@
 	{
 		if( ( s = strstr( headers, "\r\n\r\n" ) ) )
-			st = write( 2, headers, s - headers + 4 );
+			write( 2, headers, s - headers + 4 );
 		else
-			st = write( 2, headers, strlen( headers ) );
+			write( 2, headers, strlen( headers ) );
 	}
 	
Index: protocols/oscar/chat.c
===================================================================
--- protocols/oscar/chat.c	(revision df98ee8b4abaa890a02e706d69b93724e8f7744d)
+++ protocols/oscar/chat.c	(revision b041b521c8b347c4660b0920f17b92b9c1484f49)
@@ -384,5 +384,4 @@
 	char *roomname = NULL;
 	struct aim_chat_roominfo roominfo;
-	guint16 tlvcount = 0;
 	aim_tlvlist_t *tlvlist;
 	char *roomdesc = NULL;
@@ -401,5 +400,5 @@
 	}
 
-	tlvcount = aimbs_get16(bs);
+	aimbs_get16(bs); /* tlv count */
 
 	/*
Index: protocols/oscar/chatnav.c
===================================================================
--- protocols/oscar/chatnav.c	(revision df98ee8b4abaa890a02e706d69b93724e8f7744d)
+++ protocols/oscar/chatnav.c	(revision b041b521c8b347c4660b0920f17b92b9c1484f49)
@@ -139,10 +139,6 @@
 		 * Type 0x0002: Unknown
 		 */
-		if (aim_gettlv(innerlist, 0x0002, 1)) {
-			guint16 classperms;
-
-			classperms = aim_gettlv16(innerlist, 0x0002, 1);
-			
-		}
+		if (aim_gettlv(innerlist, 0x0002, 1))
+			;
 
 		/*
@@ -205,7 +201,5 @@
 		 */
 		if (aim_gettlv(innerlist, 0x00d5, 1)) {
-			guint8 createperms;
-
-			createperms = aim_gettlv8(innerlist, 0x00d5, 1);
+			aim_gettlv8(innerlist, 0x00d5, 1); /* createperms */
 		}
 
Index: protocols/oscar/icq.c
===================================================================
--- protocols/oscar/icq.c	(revision df98ee8b4abaa890a02e706d69b93724e8f7744d)
+++ protocols/oscar/icq.c	(revision b041b521c8b347c4660b0920f17b92b9c1484f49)
@@ -235,6 +235,5 @@
 	aim_tlv_t *datatlv;
 	aim_bstream_t qbs;
-	guint32 ouruin;
-	guint16 cmdlen, cmd, reqid;
+	guint16 cmd, reqid;
 
 	if (!(tl = aim_readtlvchain(bs)) || !(datatlv = aim_gettlv(tl, 0x0001, 1))) {
@@ -246,6 +245,6 @@
 	aim_bstream_init(&qbs, datatlv->value, datatlv->length);
 
-	cmdlen = aimbs_getle16(&qbs);
-	ouruin = aimbs_getle32(&qbs);
+	aimbs_getle16(&qbs); /* cmdlen */
+	aimbs_getle32(&qbs); /* ouruin */
 	cmd = aimbs_getle16(&qbs);
 	reqid = aimbs_getle16(&qbs);
Index: protocols/oscar/im.c
===================================================================
--- protocols/oscar/im.c	(revision df98ee8b4abaa890a02e706d69b93724e8f7744d)
+++ protocols/oscar/im.c	(revision b041b521c8b347c4660b0920f17b92b9c1484f49)
@@ -919,5 +919,4 @@
 	int i, ret = 0;
 	aim_rxcallback_t userfunc;
-	guint8 cookie[8];
 	guint16 channel;
 	aim_tlvlist_t *tlvlist;
@@ -931,5 +930,5 @@
 	/* ICBM Cookie. */
 	for (i = 0; i < 8; i++)
-		cookie[i] = aimbs_get8(bs);
+		aimbs_get8(bs);
 
 	/* Channel ID */
@@ -1414,5 +1413,5 @@
 {
 	guint16 hdrlen, msglen, dc;
-	guint8 msgtype, msgflags;
+	guint8 msgtype;
     guint8 *plugin;
     int i = 0, tmp = 0;
@@ -1442,5 +1441,5 @@
 
         msgtype = aimbs_getle8(servdata);
-        msgflags = aimbs_getle8(servdata);
+        aimbs_getle8(servdata); /* msgflags */
 
         aim_bstream_advance(servdata, 0x04); /* status code and priority code */
Index: protocols/oscar/misc.c
===================================================================
--- protocols/oscar/misc.c	(revision df98ee8b4abaa890a02e706d69b93724e8f7744d)
+++ protocols/oscar/misc.c	(revision b041b521c8b347c4660b0920f17b92b9c1484f49)
@@ -310,5 +310,4 @@
 {
 	aim_frame_t *fr;
-	aim_snacid_t snacid;
 	aim_tlvlist_t *tl = NULL;
 
@@ -330,5 +329,5 @@
 		return -ENOMEM;
 
-	snacid = aim_cachesnac(sess, 0x0002, 0x000f, 0x0000, NULL, 0);
+	aim_cachesnac(sess, 0x0002, 0x000f, 0x0000, NULL, 0);
 
 	aim_putsnac(&fr->data, 0x0002, 0x000f, 0x0000, 0);
Index: protocols/oscar/oscar.c
===================================================================
--- protocols/oscar/oscar.c	(revision df98ee8b4abaa890a02e706d69b93724e8f7744d)
+++ protocols/oscar/oscar.c	(revision b041b521c8b347c4660b0920f17b92b9c1484f49)
@@ -1072,10 +1072,10 @@
 static void gaim_icq_authgrant(void *data_) {
 	struct icq_auth *data = data_;
-	char *uin, message;
+	char *uin;
 	struct oscar_data *od = (struct oscar_data *)data->ic->proto_data;
 	
 	uin = g_strdup_printf("%u", data->uin);
-	message = 0;
 	aim_ssi_auth_reply(od->sess, od->conn, uin, 1, "");
+	// char *message = 0;
 	// aim_send_im_ch4(od->sess, uin, AIM_ICQMSG_AUTHGRANTED, &message);
 	imcb_ask_add(data->ic, uin, NULL);
@@ -1219,9 +1219,9 @@
 static int gaim_parse_misses(aim_session_t *sess, aim_frame_t *fr, ...) {
 	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); /* chan */
 	userinfo = va_arg(ap, aim_userinfo_t *);
 	nummissed = (guint16)va_arg(ap, unsigned int);
@@ -1335,5 +1335,4 @@
 
 static int gaim_parse_motd(aim_session_t *sess, aim_frame_t *fr, ...) {
-	char *msg;
 	guint16 id;
 	va_list ap;
@@ -1341,5 +1340,5 @@
 	va_start(ap, fr);
 	id  = (guint16)va_arg(ap, unsigned int);
-	msg = va_arg(ap, char *);
+	va_arg(ap, char *); /* msg */
 	va_end(ap);
 
@@ -1361,11 +1360,7 @@
 	switch(type) {
 		case 0x0002: {
-			guint8 maxrooms;
-			struct aim_chat_exchangeinfo *exchanges;
-			int exchangecount; // i;
-
-			maxrooms = (guint8)va_arg(ap, unsigned int);
-			exchangecount = va_arg(ap, int);
-			exchanges = va_arg(ap, struct aim_chat_exchangeinfo *);
+			va_arg(ap, unsigned int); /* maxrooms */
+			va_arg(ap, int); /* exchangecount */
+			va_arg(ap, struct aim_chat_exchangeinfo *); /* exchanges */
 			va_end(ap);
 
@@ -1380,19 +1375,17 @@
 			break;
 		case 0x0008: {
-			char *fqcn, *name, *ck;
-			guint16 instance, flags, maxmsglen, maxoccupancy, unknown, exchange;
-			guint8 createperms;
-			guint32 createtime;
-
-			fqcn = va_arg(ap, char *);
+			char *ck;
+			guint16 instance, exchange;
+
+			va_arg(ap, char *); /* fqcn */
 			instance = (guint16)va_arg(ap, unsigned int);
 			exchange = (guint16)va_arg(ap, unsigned int);
-			flags = (guint16)va_arg(ap, unsigned int);
-			createtime = va_arg(ap, guint32);
-			maxmsglen = (guint16)va_arg(ap, unsigned int);
-			maxoccupancy = (guint16)va_arg(ap, unsigned int);
-			createperms = (guint8)va_arg(ap, int);
-			unknown = (guint16)va_arg(ap, unsigned int);
-			name = va_arg(ap, char *);
+			va_arg(ap, unsigned int); /* flags */
+			va_arg(ap, guint32); /* createtime */
+			va_arg(ap, unsigned int); /* maxmsglen */
+			va_arg(ap, unsigned int); /* maxoccupancy */
+			va_arg(ap, int); /* createperms */
+			va_arg(ap, unsigned int); /* unknown */
+			va_arg(ap, char *); /* name */
 			ck = va_arg(ap, char *);
 			va_end(ap);
@@ -1456,25 +1449,19 @@
 static int gaim_chat_info_update(aim_session_t *sess, aim_frame_t *fr, ...) {
 	va_list ap;
-	aim_userinfo_t *userinfo;
-	struct aim_chat_roominfo *roominfo;
-	char *roomname;
-	int usercount;
-	char *roomdesc;
-	guint16 unknown_c9, unknown_d2, unknown_d5, maxmsglen, maxvisiblemsglen;
-	guint32 creationtime;
+	guint16 maxmsglen, maxvisiblemsglen;
 	struct im_connection *ic = sess->aux_data;
 	struct chat_connection *ccon = find_oscar_chat_by_conn(ic, fr->conn);
 
 	va_start(ap, fr);
-	roominfo = va_arg(ap, struct aim_chat_roominfo *);
-	roomname = va_arg(ap, char *);
-	usercount= va_arg(ap, int);
-	userinfo = va_arg(ap, aim_userinfo_t *);
-	roomdesc = va_arg(ap, char *);
-	unknown_c9 = (guint16)va_arg(ap, int);
-	creationtime = (guint32)va_arg(ap, unsigned long);
+	va_arg(ap, struct aim_chat_roominfo *); /* roominfo */
+	va_arg(ap, char *); /* roomname */
+	va_arg(ap, int); /* usercount */
+	va_arg(ap, aim_userinfo_t *); /* userinfo */
+	va_arg(ap, char *); /* roomdesc */
+	va_arg(ap, int); /* unknown_c9 */
+	va_arg(ap, unsigned long); /* creationtime */
 	maxmsglen = (guint16)va_arg(ap, int);
-	unknown_d2 = (guint16)va_arg(ap, int);
-	unknown_d5 = (guint16)va_arg(ap, int);
+	va_arg(ap, int); /* unknown_d2 */
+	va_arg(ap, int); /* unknown_d5 */
 	maxvisiblemsglen = (guint16)va_arg(ap, int);
 	va_end(ap);
@@ -1517,17 +1504,17 @@
 #endif
 	va_list ap;
-	guint16 code, rateclass;
-	guint32 windowsize, clear, alert, limit, disconnect, currentavg, maxavg;
+	guint16 code;
+	guint32 windowsize, clear, currentavg;
 
 	va_start(ap, fr); 
 	code = (guint16)va_arg(ap, unsigned int);
-	rateclass= (guint16)va_arg(ap, unsigned int);
+	va_arg(ap, unsigned int); /* rateclass */
 	windowsize = (guint32)va_arg(ap, unsigned long);
 	clear = (guint32)va_arg(ap, unsigned long);
-	alert = (guint32)va_arg(ap, unsigned long);
-	limit = (guint32)va_arg(ap, unsigned long);
-	disconnect = (guint32)va_arg(ap, unsigned long);
+	va_arg(ap, unsigned long); /* alert */
+	va_arg(ap, unsigned long); /* limit */
+	va_arg(ap, unsigned long); /* disconnect */
 	currentavg = (guint32)va_arg(ap, unsigned long);
-	maxavg = (guint32)va_arg(ap, unsigned long);
+	va_arg(ap, unsigned long); /* maxavg */
 	va_end(ap);
 
@@ -2417,9 +2404,9 @@
 	struct im_connection * ic = sess->aux_data;
 	va_list ap;
-	guint16 type1, type2;
+	guint16 type2;
 	char * sn;
 
 	va_start(ap, fr);
-	type1 = va_arg(ap, int);
+	va_arg(ap, int); /* type1 */
 	sn = va_arg(ap, char*);
 	type2 = va_arg(ap, int);
@@ -2541,7 +2528,5 @@
 
 	if((cur = aim_getconn_type(od->sess, AIM_CONN_TYPE_CHATNAV))) {
-		int st;
-		
-		st = aim_chatnav_createroom(od->sess, cur, room, exchange_number);
+		aim_chatnav_createroom(od->sess, cur, room, exchange_number);
 		
 		return ret;
@@ -2570,5 +2555,4 @@
 	static int chat_id = 0;
 	char * chatname, *s;
-	struct groupchat *c;
 	
 	chatname = g_strdup_printf("%s%s%d", isdigit(*ic->acc->user) ? "icq" : "",
@@ -2579,5 +2563,4 @@
 			*s = '0';
 	
-	c = imcb_chat_new(ic, chatname);
 	ret = oscar_chat_join_internal(ic, chatname, NULL, NULL, 4);
 	aim_chat_invite(od->sess, od->conn, who, "", 4, chatname, 0x0);
@@ -2585,5 +2568,5 @@
 	g_free(chatname);
 	
-	return NULL;
+	return ret;
 }
 
Index: protocols/oscar/rxqueue.c
===================================================================
--- protocols/oscar/rxqueue.c	(revision df98ee8b4abaa890a02e706d69b93724e8f7744d)
+++ protocols/oscar/rxqueue.c	(revision b041b521c8b347c4660b0920f17b92b9c1484f49)
@@ -388,8 +388,6 @@
 	 */
 	if (aimbs_get8(&flaphdr) != 0x2a) {
-		guint8 start;
-
 		aim_bstream_rewind(&flaphdr);
-		start = aimbs_get8(&flaphdr);
+		aimbs_get8(&flaphdr);
 		imcb_error(sess->aux_data, "FLAP framing disrupted");
 		aim_conn_close(conn);
Index: protocols/oscar/service.c
===================================================================
--- protocols/oscar/service.c	(revision df98ee8b4abaa890a02e706d69b93724e8f7744d)
+++ protocols/oscar/service.c	(revision b041b521c8b347c4660b0920f17b92b9c1484f49)
@@ -563,7 +563,5 @@
 	groupcount = aimbs_get16(bs);
 	for (i = 0; i < groupcount; i++) {
-		guint16 group;
-
-		group = aimbs_get16(bs);
+		aimbs_get16(bs);
 
 		imcb_error(sess->aux_data, "bifurcated migration unsupported");
@@ -701,9 +699,8 @@
 static int hostversions(aim_session_t *sess, aim_module_t *mod, aim_frame_t *rx, aim_modsnac_t *snac, aim_bstream_t *bs)
 {
-	int vercount;
 	guint8 *versions;
 
 	/* This is frivolous. (Thank you SmarterChild.) */
-	vercount = aim_bstream_empty(bs)/4;
+	aim_bstream_empty(bs); /* == vercount * 4 */
 	versions = aimbs_getraw(bs, aim_bstream_empty(bs));
 	g_free(versions);
@@ -731,5 +728,4 @@
 	aim_tlvlist_t *tl = NULL;
 	guint32 data;
-	int tlvlen;
 	struct im_connection *ic = sess ? sess->aux_data : NULL;
 
@@ -739,5 +735,5 @@
 		data |= AIM_ICQ_STATE_WEBAWARE;
 
-	tlvlen = aim_addtlvtochain32(&tl, 0x0006, data);
+	aim_addtlvtochain32(&tl, 0x0006, data); /* tlvlen */
 
 	if (!(fr = aim_tx_new(sess, conn, AIM_FRAMETYPE_FLAP, 0x02, 10 + 8)))
Index: protocols/yahoo/libyahoo2.c
===================================================================
--- protocols/yahoo/libyahoo2.c	(revision df98ee8b4abaa890a02e706d69b93724e8f7744d)
+++ protocols/yahoo/libyahoo2.c	(revision b041b521c8b347c4660b0920f17b92b9c1484f49)
@@ -1809,5 +1809,4 @@
 	struct yahoo_input_data *yid = had->yid;
 	struct yahoo_data *yd = yid->yd;
-	struct http_request *req;
 	char *login, *passwd, *chal;
 	char *url;
@@ -1823,5 +1822,5 @@
 	                       (int) time(NULL), login, passwd, chal);
 	
-	req = http_dorequest_url(url, yahoo_https_auth_token_finish, had);
+	http_dorequest_url(url, yahoo_https_auth_token_finish, had);
 	
 	g_free(url);
@@ -1870,5 +1869,4 @@
 static void yahoo_https_auth_init(struct yahoo_https_auth_data *had)
 {
-	struct http_request *req;
 	char *url;
 	
@@ -1876,5 +1874,5 @@
 	                      (int) time(NULL), had->token);
 	
-	req = http_dorequest_url(url, yahoo_https_auth_finish, had);
+	http_dorequest_url(url, yahoo_https_auth_finish, had);
 	
 	g_free(url);
@@ -1990,6 +1988,4 @@
 {
 	struct yahoo_data *yd = yid->yd;
-	char *login_id;
-	char *handle;
 	char *url = NULL;
 	int login_status = -1;
@@ -2000,7 +1996,7 @@
 		struct yahoo_pair *pair = l->data;
 		if (pair->key == 0)
-			login_id = pair->value;
+			; /* login_id */
 		else if (pair->key == 1)
-			handle = pair->value;
+			; /* handle */
 		else if (pair->key == 20)
 			url = pair->value;
@@ -2089,7 +2085,5 @@
 	char *msg = NULL;
 	char *name = NULL;
-	long tm = 0L;
 	int state = YAHOO_STATUS_AVAILABLE;
-	int online = 0;
 	int away = 0;
 	int idle = 0;
@@ -2111,7 +2105,7 @@
 			state = strtol(pair->value, NULL, 10);
 		else if (pair->key == 15)
-			tm = strtol(pair->value, NULL, 10);
+			; /* tm */
 		else if (pair->key == 13)
-			online = strtol(pair->value, NULL, 10);
+			; /* online */
 		else if (pair->key == 47)
 			away = strtol(pair->value, NULL, 10);
@@ -2140,5 +2134,4 @@
 	char *where = NULL;
 	int status = 0;
-	char *me = NULL;
 
 	struct yahoo_buddy *bud = NULL;
@@ -2148,5 +2141,5 @@
 		struct yahoo_pair *pair = l->data;
 		if (pair->key == 1)
-			me = pair->value;
+			; /* Me... don't care */
 		if (pair->key == 7)
 			who = pair->value;
@@ -2204,6 +2197,4 @@
 	char *who = NULL;
 	char *where = NULL;
-	int unk_66 = 0;
-	char *me = NULL;
 	struct yahoo_buddy *bud;
 
@@ -2214,5 +2205,5 @@
 		struct yahoo_pair *pair = l->data;
 		if (pair->key == 1)
-			me = pair->value;
+			; /* Me... don't care */
 		else if (pair->key == 7)
 			who = pair->value;
@@ -2220,5 +2211,5 @@
 			where = pair->value;
 		else if (pair->key == 66)
-			unk_66 = strtol(pair->value, NULL, 10);
+			; /* unk_66 */
 		else
 			DEBUG_MSG(("unknown key: %d = %s", pair->key,
@@ -2256,20 +2247,15 @@
 	struct yahoo_packet *pkt)
 {
-	char *who = NULL;
-	int status = 0;
-	char *me = NULL;
-	int un_ignore = 0;
-
 	YList *l;
 	for (l = pkt->hash; l; l = l->next) {
 		struct yahoo_pair *pair = l->data;
 		if (pair->key == 0)
-			who = pair->value;
+			; /* who */
 		if (pair->key == 1)
-			me = pair->value;
+			; /* Me... don't care */
 		if (pair->key == 13)	/* 1 == ignore, 2 == unignore */
-			un_ignore = strtol(pair->value, NULL, 10);
+			;
 		if (pair->key == 66)
-			status = strtol(pair->value, NULL, 10);
+			; /* status */
 	}
 
@@ -2293,5 +2279,4 @@
 	char *me = NULL;
 	char *room = NULL;
-	char *voice_room = NULL;
 
 	YList *l;
@@ -2303,5 +2288,5 @@
 			me = pair->value;
 		if (pair->key == 13)
-			voice_room = pair->value;
+			; /* voice room */
 		if (pair->key == 57)
 			room = pair->value;
@@ -2438,5 +2423,4 @@
 	struct yahoo_packet *pkt)
 {
-	char *me = NULL;
 	char *key = NULL;
 	char *who = NULL;
@@ -2447,5 +2431,5 @@
 		struct yahoo_pair *pair = l->data;
 		if (pair->key == 5)
-			me = pair->value;
+			; /* me */
 		if (pair->key == 61)
 			key = pair->value;
@@ -3369,5 +3353,4 @@
 	struct yahoo_webcam *wcm = y->wcm;
 	struct yahoo_input_data *yid;
-	struct yahoo_server_settings *yss;
 
 	if (!wcm || !wcm->server || !wcm->key)
@@ -3381,6 +3364,4 @@
 	yid->wcm = y->wcm;
 	y->wcm = NULL;
-
-	yss = y->yd->server_settings;
 
 	yid->wcd = y_new0(struct yahoo_webcam_data, 1);
@@ -4975,6 +4956,4 @@
 	YList *l;
 	struct send_file_data *sfd;
-	char *who = NULL;
-	char *filename = NULL;
 	char *id = NULL;
 	char *token = NULL;
@@ -4984,5 +4963,5 @@
 		switch (pair->key) {
 		case 4:
-			who = pair->value;
+			/* who */
 			break;
 		case 5:
@@ -4998,5 +4977,5 @@
 			break;
 		case 27:
-			filename = pair->value;
+			/* filename */
 			break;
 		}
@@ -5023,6 +5002,4 @@
 {
 	YList *l;
-	char *who = NULL;
-	char *filename = NULL;
 	char *id = NULL;
 	char *token = NULL;
@@ -5036,5 +5013,5 @@
 		case 1:
 		case 4:
-			who = pair->value;
+			/* who */
 			break;
 		case 5:
@@ -5053,5 +5030,5 @@
 			break;
 		case 27:
-			filename = pair->value;
+			/* filename */
 			break;
 		}
