pidgin: ce6fb9ba: Remove dead assignments found with clang...
qulogic at pidgin.im
qulogic at pidgin.im
Thu Dec 22 04:41:55 EST 2011
----------------------------------------------------------------------
Revision: ce6fb9ba3880c9f5cca543386264c7a4e744a64a
Parent: 0e36d349baa6098687317239cfc6527d75456f1d
Author: qulogic at pidgin.im
Date: 12/22/11 03:39:45
Branch: im.pidgin.pidgin
URL: http://d.pidgin.im/viewmtn/revision/info/ce6fb9ba3880c9f5cca543386264c7a4e744a64a
Changelog:
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.
Changes against parent 0e36d349baa6098687317239cfc6527d75456f1d
patched libpurple/plugins/log_reader.c
patched libpurple/protocols/gg/gg.c
patched libpurple/protocols/mxit/filexfer.c
patched libpurple/protocols/mxit/login.c
patched libpurple/protocols/mxit/markup.c
patched libpurple/protocols/novell/novell.c
patched libpurple/protocols/oscar/oscar.c
patched libpurple/protocols/oscar/peer.c
patched libpurple/protocols/oscar/userinfo.c
patched libpurple/protocols/silc/ops.c
patched libpurple/protocols/silc/silc.c
patched libpurple/protocols/silc/wb.c
patched libpurple/protocols/yahoo/libymsg.c
patched libpurple/proxy.c
patched pidgin/gtkpounce.c
-------------- next part --------------
============================================================
--- libpurple/proxy.c 956d3df8655b85878d11815d07377ba72b8cfd3c
+++ libpurple/proxy.c bc13e6231d02debf8c80298a98dae18150bbbfc3
@@ -2024,7 +2024,6 @@ s5_canwrite(gpointer data, gint source,
return;
}
- i = 0;
buf[0] = 0x05; /* SOCKS version 5 */
if (purple_proxy_info_get_username(connect_data->gpi) != NULL) {
============================================================
--- libpurple/protocols/oscar/oscar.c f32b4639e6846e12e06fe78b5cb9bbc4844e9d0f
+++ libpurple/protocols/oscar/oscar.c 9f34f275fd267361362b7d748c45f417935c6d67
@@ -3481,13 +3481,11 @@ oscar_get_extended_status(PurpleConnecti
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 @@ const char *oscar_list_emblem(PurpleBudd
PurpleAccount *account = NULL;
PurplePresence *presence;
PurpleStatus *status;
- const char *status_id;
aim_userinfo_t *userinfo = NULL;
const char *name;
@@ -4634,7 +4631,6 @@ const char *oscar_list_emblem(PurpleBudd
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 @@ char *oscar_status_text(PurpleBuddy *b)
OscarData *od;
const PurplePresence *presence;
const PurpleStatus *status;
- const char *id;
const char *message;
gchar *ret = NULL;
@@ -4702,7 +4697,6 @@ char *oscar_status_text(PurpleBuddy *b)
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))
{
============================================================
--- libpurple/protocols/gg/gg.c 25797b5bc894306d983de39abac7645326e59c8d
+++ libpurple/protocols/gg/gg.c 97da098a6852b937c89a9359b8f6da860422c8a1
@@ -1091,6 +1091,7 @@ static void gg_get_avatar_url_cb(PurpleU
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 @@ static void ggp_update_buddy_avatar(Purp
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,
============================================================
--- libpurple/protocols/yahoo/libymsg.c 23474bb96a40b979634cbb4ed7a330f94521cee0
+++ libpurple/protocols/yahoo/libymsg.c afd8ec7a4457d6c35be7a00b3fc3e50c83b416f2
@@ -634,7 +634,6 @@ static void yahoo_process_list(PurpleCon
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 @@ static void yahoo_process_list(PurpleCon
}
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);
============================================================
--- pidgin/gtkpounce.c 11ce2ecefe082d58c38b92fd77a1ba53c933f4d4
+++ pidgin/gtkpounce.c 542b1c74091c7a5603c67b54b2ea5ed7d4747c9a
@@ -1419,7 +1419,6 @@ pounce_cb(PurplePounce *pounce, PurplePo
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 @@ pounce_cb(PurplePounce *pounce, PurplePo
_("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));
============================================================
--- libpurple/protocols/novell/novell.c 4756c5e9d33f0a4b0c486c90a60fef9add24f33d
+++ libpurple/protocols/novell/novell.c 792e92e183e2bd5e5c4634a8149f2c9db3c7f0f7
@@ -1177,7 +1177,6 @@ _update_buddy_status(NMUser *user, Purpl
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 @@ _update_buddy_status(NMUser *user, Purpl
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 @@ _update_buddy_status(NMUser *user, Purpl
break;
default:
status_id = NOVELL_STATUS_TYPE_OFFLINE;
- loggedin = FALSE;
break;
}
============================================================
--- libpurple/protocols/silc/ops.c d53b129e62f9ff1c77f0bc8e7ecbac969fa7173c
+++ libpurple/protocols/silc/ops.c c61cd3e7439158833e4866c73abce37cc2a5f796
@@ -224,7 +224,6 @@ silcpurple_mime_message(SilcClient clien
tmp, cflags, time(NULL));
purple_imgstore_unref_by_id(imgid);
- cflags = 0;
ret = TRUE;
}
goto out;
============================================================
--- libpurple/protocols/silc/silc.c f6bf84b3443f22cd069efd6c7058c596960d6a2c
+++ libpurple/protocols/silc/silc.c f61e37b261cb14ec31c5b91b493f788894826433
@@ -400,7 +400,7 @@ silcpurple_stream_created(SilcSocketStre
}
/* 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);
============================================================
--- libpurple/plugins/log_reader.c 0e8fd40140c600deaadeefb5ba8b02b1c6b20dc0
+++ libpurple/plugins/log_reader.c 9e44268d47feb41f6f024bb0bbb5c52e6287e7bf
@@ -2203,7 +2203,6 @@ static GList *amsn_logger_parse_file(cha
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:"
============================================================
--- libpurple/protocols/silc/wb.c 9bd78592996e15156b221e8c886305e782ddd4c7
+++ libpurple/protocols/silc/wb.c 0ea5ddd0518990f940dd7dfb97c703a12b994864
@@ -105,11 +105,9 @@ PurpleWhiteboard *silcpurple_wb_init(Sil
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);
============================================================
--- libpurple/protocols/oscar/peer.c 078ad3358973f338ea3de25f9a041b0bea9154c1
+++ libpurple/protocols/oscar/peer.c dcf11f829d74f5904d72185eb6bcc38a922ad3fb
@@ -603,15 +603,11 @@ peer_connection_listen_cb(gpointer data,
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");
============================================================
--- libpurple/protocols/mxit/filexfer.c ae7019e85a8e5e7ceff124a7a443045f01d350e8
+++ libpurple/protocols/mxit/filexfer.c 4114b932117473ba7b3a817a835fd4c64007ef81
@@ -427,15 +427,12 @@ void mxit_xfer_rx_file( struct MXitSessi
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 );
============================================================
--- libpurple/protocols/mxit/login.c 666f156b2bb33e3e5164d9b156cd434a37617665
+++ libpurple/protocols/mxit/login.c 83abc02c1c7d4f71ed4825535770413c7982d243
@@ -567,6 +567,7 @@ static void mxit_cb_captcha_ok( PurpleCo
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 @@ static void get_clientinfo( struct MXitS
/* 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
============================================================
--- libpurple/protocols/mxit/markup.c 230c0bca83bdafd133b9f8584f43fad4590725c5
+++ libpurple/protocols/mxit/markup.c 2ec92e1b2229c18700c75a88bd830393a4ad3491
@@ -628,6 +628,7 @@ static void emoticon_request( struct RXM
/* 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 );
}
============================================================
--- libpurple/protocols/oscar/userinfo.c c47a311acf25b21964d38e8a82bc2eb22465d6b0
+++ libpurple/protocols/oscar/userinfo.c 4a8d80b12d772d69c5ac9de737155e98f7a87085
@@ -307,8 +307,6 @@ oscar_user_info_append_extra_info(Purple
{
OscarData *od;
PurpleAccount *account;
- PurplePresence *presence = NULL;
- PurpleStatus *status = NULL;
PurpleGroup *g = NULL;
struct buddyinfo *bi = NULL;
char *tmp;
@@ -330,8 +328,6 @@ oscar_user_info_append_extra_info(Purple
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)
More information about the Commits
mailing list