Mercurial > pidgin
changeset 32410:f07501af8bae
Remove dead assignments found with clang-analyzer.
Also, remove the unused variables resulting from this cleanup.
Added a FIXME in cases where variables are not read, but should
be used later.
author | Elliott Sales de Andrade <qulogic@pidgin.im> |
---|---|
date | Thu, 22 Dec 2011 08:39:45 +0000 |
parents | 0cf09e1ae01a |
children | 85d75e81e12f |
files | libpurple/plugins/log_reader.c libpurple/protocols/gg/gg.c libpurple/protocols/mxit/filexfer.c libpurple/protocols/mxit/login.c libpurple/protocols/mxit/markup.c libpurple/protocols/novell/novell.c libpurple/protocols/oscar/oscar.c libpurple/protocols/oscar/peer.c libpurple/protocols/oscar/userinfo.c libpurple/protocols/silc/ops.c libpurple/protocols/silc/silc.c libpurple/protocols/silc/wb.c libpurple/protocols/yahoo/libymsg.c libpurple/proxy.c pidgin/gtkpounce.c |
diffstat | 15 files changed, 6 insertions(+), 37 deletions(-) [+] |
line wrap: on
line diff
--- a/libpurple/plugins/log_reader.c Thu Dec 22 07:55:41 2011 +0000 +++ b/libpurple/plugins/log_reader.c Thu Dec 22 08:39:45 2011 +0000 @@ -2203,7 +2203,6 @@ log->logger = amsn_logger; log->logger_data = data; list = g_list_prepend(list, log); - found_start = FALSE; purple_debug_info("aMSN logger", "Found log for %s:"
--- a/libpurple/protocols/gg/gg.c Thu Dec 22 07:55:41 2011 +0000 +++ b/libpurple/protocols/gg/gg.c Thu Dec 22 08:39:45 2011 +0000 @@ -1091,6 +1091,7 @@ purple_debug_info("gg", "gg_get_avatar_url_cb: " "requesting avatar for %s\n", uin); + /* FIXME: This should be cancelled somewhere if not needed. */ url_data = purple_util_fetch_url_request(account, bigavatar, TRUE, "Mozilla/4.0 (compatible; MSIE 5.0)", FALSE, NULL, FALSE, -1, gg_fetch_avatar_cb, data); @@ -1119,6 +1120,7 @@ avatarurl = g_strdup_printf("http://api.gadu-gadu.pl/avatars/%u/0.xml", uin); + /* FIXME: This should be cancelled somewhere if not needed. */ url_data = purple_util_fetch_url_request( purple_connection_get_account(gc), avatarurl, TRUE, "Mozilla/4.0 (compatible; MSIE 5.5)", FALSE, NULL, FALSE, -1,
--- a/libpurple/protocols/mxit/filexfer.c Thu Dec 22 07:55:41 2011 +0000 +++ b/libpurple/protocols/mxit/filexfer.c Thu Dec 22 08:39:45 2011 +0000 @@ -427,15 +427,12 @@ void mxit_xfer_rx_file( struct MXitSession* session, const char* fileid, const char* data, int datalen ) { PurpleXfer* xfer = NULL; - struct mxitxfer* mx = NULL; purple_debug_info( MXIT_PLUGIN_ID, "mxit_xfer_rx_file: (size=%i)\n", datalen ); /* find the file-transfer object */ xfer = find_mxit_xfer( session, fileid ); if ( xfer ) { - mx = purple_xfer_get_protocol_data( xfer ); - /* this is the transfer we have been looking for */ purple_xfer_ref( xfer ); purple_xfer_start( xfer, -1, NULL, 0 );
--- a/libpurple/protocols/mxit/login.c Thu Dec 22 07:55:41 2011 +0000 +++ b/libpurple/protocols/mxit/login.c Thu Dec 22 08:39:45 2011 +0000 @@ -567,6 +567,7 @@ MXIT_CAPTCHA_WIDTH, time( NULL ) ); + /* FIXME: This should be cancelled somewhere if not needed. */ url_data = purple_util_fetch_url_request( session->acc, url, TRUE, MXIT_HTTP_USERAGENT, TRUE, NULL, FALSE, -1, mxit_cb_clientinfo2, session ); #ifdef DEBUG_PROTOCOL @@ -731,6 +732,7 @@ /* reference: "libpurple/util.h" */ url = g_strdup_printf( "%s/res/?type=challenge&getcountries=true&getlanguage=true&getimage=true&h=%i&w=%i&ts=%li", wapserver, MXIT_CAPTCHA_HEIGHT, MXIT_CAPTCHA_WIDTH, time( NULL ) ); + /* FIXME: This should be cancelled somewhere if not needed. */ url_data = purple_util_fetch_url_request( session->acc, url, TRUE, MXIT_HTTP_USERAGENT, TRUE, NULL, FALSE, -1, mxit_cb_clientinfo1, session ); #ifdef DEBUG_PROTOCOL
--- a/libpurple/protocols/mxit/markup.c Thu Dec 22 07:55:41 2011 +0000 +++ b/libpurple/protocols/mxit/markup.c Thu Dec 22 08:39:45 2011 +0000 @@ -628,6 +628,7 @@ /* reference: "libpurple/util.h" */ url = g_strdup_printf( "%s/res/?type=emo&mlh=%i&sc=%s&ts=%li", wapserver, MXIT_EMOTICON_SIZE, id, time( NULL ) ); + /* FIXME: This should be cancelled somewhere if not needed. */ url_data = purple_util_fetch_url( url, TRUE, NULL, TRUE, -1, emoticon_returned, mx ); g_free( url ); }
--- a/libpurple/protocols/novell/novell.c Thu Dec 22 07:55:41 2011 +0000 +++ b/libpurple/protocols/novell/novell.c Thu Dec 22 08:39:45 2011 +0000 @@ -1177,7 +1177,6 @@ const char *dn; const char *name; int idle = 0; - gboolean loggedin = TRUE; account = purple_buddy_get_account(buddy); name = purple_buddy_get_name(buddy); @@ -1194,7 +1193,6 @@ break; case NM_STATUS_OFFLINE: status_id = NOVELL_STATUS_TYPE_OFFLINE; - loggedin = FALSE; break; case NM_STATUS_AWAY_IDLE: status_id = NOVELL_STATUS_TYPE_AWAY; @@ -1202,7 +1200,6 @@ break; default: status_id = NOVELL_STATUS_TYPE_OFFLINE; - loggedin = FALSE; break; }
--- a/libpurple/protocols/oscar/oscar.c Thu Dec 22 07:55:41 2011 +0000 +++ b/libpurple/protocols/oscar/oscar.c Thu Dec 22 08:39:45 2011 +0000 @@ -3481,13 +3481,11 @@ static guint32 oscar_get_extended_status(PurpleConnection *gc) { - OscarData *od; PurpleAccount *account; PurpleStatus *status; const gchar *status_id; guint32 data = 0x00000000; - od = purple_connection_get_protocol_data(gc); account = purple_connection_get_account(gc); status = purple_account_get_active_status(account); status_id = purple_status_get_id(status); @@ -4619,7 +4617,6 @@ PurpleAccount *account = NULL; PurplePresence *presence; PurpleStatus *status; - const char *status_id; aim_userinfo_t *userinfo = NULL; const char *name; @@ -4634,7 +4631,6 @@ presence = purple_buddy_get_presence(b); status = purple_presence_get_active_status(presence); - status_id = purple_status_get_id(status); if (purple_presence_is_online(presence) == FALSE) { char *gname; @@ -4693,7 +4689,6 @@ OscarData *od; const PurplePresence *presence; const PurpleStatus *status; - const char *id; const char *message; gchar *ret = NULL; @@ -4702,7 +4697,6 @@ od = purple_connection_get_protocol_data(gc); presence = purple_buddy_get_presence(b); status = purple_presence_get_active_status(presence); - id = purple_status_get_id(status); if ((od != NULL) && !purple_presence_is_online(presence)) {
--- a/libpurple/protocols/oscar/peer.c Thu Dec 22 07:55:41 2011 +0000 +++ b/libpurple/protocols/oscar/peer.c Thu Dec 22 08:39:45 2011 +0000 @@ -603,15 +603,11 @@ peer_connection_listen_cb(gpointer data, gint source, PurpleInputCondition cond) { PeerConnection *conn; - OscarData *od; - PurpleConnection *gc; struct sockaddr addr; socklen_t addrlen = sizeof(addr); int flags; conn = data; - od = conn->od; - gc = od->gc; purple_debug_info("oscar", "Accepting connection on listener socket.\n");
--- a/libpurple/protocols/oscar/userinfo.c Thu Dec 22 07:55:41 2011 +0000 +++ b/libpurple/protocols/oscar/userinfo.c Thu Dec 22 08:39:45 2011 +0000 @@ -307,8 +307,6 @@ { OscarData *od; PurpleAccount *account; - PurplePresence *presence = NULL; - PurpleStatus *status = NULL; PurpleGroup *g = NULL; struct buddyinfo *bi = NULL; char *tmp; @@ -330,8 +328,6 @@ bname = purple_buddy_get_name(b); g = purple_buddy_get_group(b); gname = purple_group_get_name(g); - presence = purple_buddy_get_presence(b); - status = purple_presence_get_active_status(presence); } if (userinfo != NULL)
--- a/libpurple/protocols/silc/ops.c Thu Dec 22 07:55:41 2011 +0000 +++ b/libpurple/protocols/silc/ops.c Thu Dec 22 08:39:45 2011 +0000 @@ -224,7 +224,6 @@ tmp, cflags, time(NULL)); purple_imgstore_unref_by_id(imgid); - cflags = 0; ret = TRUE; } goto out;
--- a/libpurple/protocols/silc/silc.c Thu Dec 22 07:55:41 2011 +0000 +++ b/libpurple/protocols/silc/silc.c Thu Dec 22 08:39:45 2011 +0000 @@ -400,7 +400,7 @@ } /* Perform SILC Key Exchange. */ - silc_client_key_exchange(sg->client, ¶ms, sg->public_key, + silc_client_key_exchange(client, ¶ms, sg->public_key, sg->private_key, stream, SILC_CONN_SERVER, silcpurple_connect_cb, gc);
--- a/libpurple/protocols/silc/wb.c Thu Dec 22 07:55:41 2011 +0000 +++ b/libpurple/protocols/silc/wb.c Thu Dec 22 08:39:45 2011 +0000 @@ -105,11 +105,9 @@ PurpleWhiteboard *silcpurple_wb_init(SilcPurple sg, SilcClientEntry client_entry) { - SilcClientConnection conn; PurpleWhiteboard *wb; SilcPurpleWb wbs; - conn = sg->conn; wb = purple_whiteboard_get_session(sg->account, client_entry->nickname); if (!wb) wb = purple_whiteboard_create(sg->account, client_entry->nickname, 0);
--- a/libpurple/protocols/yahoo/libymsg.c Thu Dec 22 07:55:41 2011 +0000 +++ b/libpurple/protocols/yahoo/libymsg.c Thu Dec 22 08:39:45 2011 +0000 @@ -634,7 +634,6 @@ static void yahoo_process_list(PurpleConnection *gc, struct yahoo_packet *pkt) { GSList *l = pkt->hash; - gboolean export = FALSE; gboolean got_serv_list = FALSE; YahooFriend *f = NULL; PurpleAccount *account = purple_connection_get_account(gc); @@ -712,7 +711,6 @@ } b = purple_buddy_new(account, norm_bud, NULL); purple_blist_add_buddy(b, NULL, g, NULL); - export = TRUE; } yahoo_do_group_check(account, ht, norm_bud, grp);
--- a/libpurple/proxy.c Thu Dec 22 07:55:41 2011 +0000 +++ b/libpurple/proxy.c Thu Dec 22 08:39:45 2011 +0000 @@ -2024,7 +2024,6 @@ return; } - i = 0; buf[0] = 0x05; /* SOCKS version 5 */ if (purple_proxy_info_get_username(connect_data->gpi) != NULL) {
--- a/pidgin/gtkpounce.c Thu Dec 22 07:55:41 2011 +0000 +++ b/pidgin/gtkpounce.c Thu Dec 22 08:39:45 2011 +0000 @@ -1419,7 +1419,6 @@ if (purple_pounce_action_is_enabled(pounce, "popup-notify")) { char *tmp; - const char *name_shown; const char *reason; reason = purple_pounce_action_get_attribute(pounce, "popup-notify", "reason"); @@ -1452,14 +1451,6 @@ _("Unknown.... Please report this!") ); - /* - * Ok here is where I change the second argument, title, from - * NULL to the account alias if we have it or the account - * name if that's all we have - */ - if ((name_shown = purple_account_get_alias(account)) == NULL) - name_shown = purple_account_get_username(account); - pidgin_notify_pounce_add(account, pounce, alias, tmp, reason, purple_date_format_full(NULL));