# HG changeset patch # User Myhailo Danylenko # Date 1311507047 -7200 # Node ID 41667bc0288316689f2373f341c6af2ad73046e3 # Parent 555e342556e7512ec48d249cbc3f6eab5d8e69ed Fix GCC warnings (variables set but not used) diff -r 555e342556e7 -r 41667bc02883 mcabber/mcabber/xmpp.c --- a/mcabber/mcabber/xmpp.c Sun May 22 23:54:32 2011 +0200 +++ b/mcabber/mcabber/xmpp.c Sun Jul 24 13:30:47 2011 +0200 @@ -324,8 +324,10 @@ #endif #if defined XEP0022 || defined XEP0085 LmMessageNode *event; + struct xep0085 *xep85 = NULL; +#if defined XEP0022 guint use_xep85 = 0; - struct xep0085 *xep85 = NULL; +#endif #endif gchar *enc = NULL; @@ -456,8 +458,10 @@ lm_message_node_set_attribute(event, "xmlns", NS_CHATSTATES); if (xep85->support == CHATSTATES_SUPPORT_UNKNOWN) xep85->support = CHATSTATES_SUPPORT_PROBED; +#ifdef XEP0022 else use_xep85 = 1; +#endif xep85->last_state_sent = ROSTER_EVENT_ACTIVE; } #endif @@ -971,7 +975,6 @@ { #if defined XEP0022 || defined XEP0085 LmMessageNode *state_ns = NULL; - const char *body; char *rname, *bjid; GSList *sl_buddy; guint events; @@ -1023,8 +1026,6 @@ return; } - body = lm_message_node_get_child_value(node, "body"); - if (which_xep == XEP_85) { /* XEP-0085 */ xep85->support = CHATSTATES_SUPPORT_OK; @@ -1042,6 +1043,7 @@ events = xep85->last_state_rcvd; } else { /* XEP-0022 */ #ifdef XEP0022 + const char *body = lm_message_node_get_child_value(node, "body"); const char *msgid; xep22->support = CHATSTATES_SUPPORT_OK; xep22->last_state_rcvd = ROSTER_EVENT_NONE;