changeset 1665:1a4890514eb9

Clean up some dead assignments/dead variables
author Ulrich Spörlein
date Tue, 02 Feb 2010 19:44:39 +0100
parents 2f6bdfa0cb01
children 68c57f52d05a
files mcabber/src/screen.c mcabber/src/xmpp.c mcabber/src/xmpp_iq.c mcabber/src/xmpp_muc.c
diffstat 4 files changed, 4 insertions(+), 9 deletions(-) [+]
line wrap: on
line diff
--- a/mcabber/src/screen.c	Sat Jan 30 17:54:58 2010 +0200
+++ b/mcabber/src/screen.c	Tue Feb 02 19:44:39 2010 +0100
@@ -1067,14 +1067,12 @@
 static void scr_UpdateWindow(winbuf *win_entry)
 {
   int n;
-  int width;
   guint prefixwidth;
   char pref[96];
   hbb_line **lines, *line;
   GList *hbuf_head;
   int color;
 
-  width = getmaxx(win_entry->win);
   prefixwidth = scr_getprefixwidth();
   prefixwidth = MIN(prefixwidth, sizeof pref);
 
--- a/mcabber/src/xmpp.c	Sat Jan 30 17:54:58 2010 +0200
+++ b/mcabber/src/xmpp.c	Tue Feb 02 19:44:39 2010 +0100
@@ -1099,8 +1099,7 @@
     // Make sure this is a room (it can be a conversion user->room)
     room_elt = roster_find(bjid, jidsearch, 0);
     if (!room_elt) {
-      room_elt = roster_add_user(bjid, NULL, NULL, ROSTER_TYPE_ROOM,
-                                 sub_none, -1);
+      roster_add_user(bjid, NULL, NULL, ROSTER_TYPE_ROOM, sub_none, -1);
     } else {
       buddy_settype(room_elt->data, ROSTER_TYPE_ROOM);
     }
@@ -1460,10 +1459,8 @@
   if (mstype == LM_MESSAGE_SUB_TYPE_SUBSCRIBE) {
     /* The sender wishes to subscribe to our presence */
     const char *msg;
-    int isagent;
     eviqs *evn;
 
-    isagent = (roster_gettype(r) & ROSTER_TYPE_AGENT) != 0;
     msg = lm_message_node_get_child_value(m->node, "status");
 
     buf = g_strdup_printf("<%s> wants to subscribe to your presence updates",
--- a/mcabber/src/xmpp_iq.c	Sat Jan 30 17:54:58 2010 +0200
+++ b/mcabber/src/xmpp_iq.c	Tue Feb 02 19:44:39 2010 +0100
@@ -294,7 +294,7 @@
 
 static void _callback_foreach_buddy_groupchat(gpointer rosterdata, void *param)
 {
-  LmMessageNode *field, *value, *option;
+  LmMessageNode *field, *option;
   const char *room_jid, *nickname;
   char *desc;
 
@@ -305,7 +305,7 @@
   field = param;
 
   option = lm_message_node_add_child(field, "option", NULL);
-  value = lm_message_node_add_child(option, "value", room_jid);
+  lm_message_node_add_child(option, "value", room_jid);
   desc = g_strdup_printf("%s on %s", nickname, room_jid);
   lm_message_node_set_attribute(option, "label", desc);
   g_free(desc);
--- a/mcabber/src/xmpp_muc.c	Sat Jan 30 17:54:58 2010 +0200
+++ b/mcabber/src/xmpp_muc.c	Tue Feb 02 19:44:39 2010 +0100
@@ -140,7 +140,7 @@
   }
 
   // Send the XML request
-  x = lm_message_new(roomid, LM_MESSAGE_TYPE_PRESENCE);
+  lm_message_new(roomid, LM_MESSAGE_TYPE_PRESENCE);
 
   x = lm_message_new_presence(mystatus, roomid, mystatusmsg);
   y = lm_message_node_add_child(x->node, "x", NULL);