pidgin/pidgin

Fix coverity dead code warnings

2014-05-17, Tomasz Wasilczyk
f06dab8296be
Parents 136469c94e3c
Children 13c42d85fc7b
Fix coverity dead code warnings
--- a/libpurple/plugins/ciphertest.c Sat May 17 12:40:29 2014 +0200
+++ b/libpurple/plugins/ciphertest.c Sat May 17 15:35:35 2014 +0200
@@ -422,11 +422,6 @@
skip_nss = TRUE;
#endif
- if (!ret) {
- purple_debug_info("cipher-test", "\tnss test failed\n");
- fail = TRUE;
- }
-
purple_debug_info("cipher-test", "\tGot: %s\n", digest);
if (digest_nss)
purple_debug_info("cipher-test", "\tGot from NSS: %s\n", digest_nss);
--- a/libpurple/prefs.c Sat May 17 12:40:29 2014 +0200
+++ b/libpurple/prefs.c Sat May 17 15:35:35 2014 +0200
@@ -396,8 +396,11 @@
error = NULL;
+#ifndef __COVERITY__
+ /* coverity dead_error_line false positive */
if (sysconfdir == NULL)
sysconfdir = "";
+#endif
filename = g_build_filename(sysconfdir, "purple", "prefs.xml", NULL);
purple_debug_info("prefs", "Reading %s\n", filename);
--- a/libpurple/protocols/yahoo/util.c Sat May 17 12:40:29 2014 +0200
+++ b/libpurple/protocols/yahoo/util.c Sat May 17 15:35:35 2014 +0200
@@ -38,13 +38,16 @@
PurpleAccount *account = purple_connection_get_account(pc);
PurpleProxyInfo *ppi = NULL;
PurpleProxyType type = PURPLE_PROXY_NONE;
- gboolean proxy_ssl = TRUE; /*purple_account_get_bool(account, "proxy_ssl", FALSE);*/
+#if 0
+ gboolean proxy_ssl = purple_account_get_bool(account, "proxy_ssl", FALSE);
if(proxy_ssl)
ppi = purple_proxy_get_setup(account);
else
ppi = purple_proxy_get_setup(NULL);
-
+#else
+ ppi = purple_proxy_get_setup(account);
+#endif
type = purple_proxy_info_get_proxy_type(ppi);
return (type == PURPLE_PROXY_HTTP || type == PURPLE_PROXY_USE_ENVVAR);
--- a/pidgin/gtkconv.c Sat May 17 12:40:29 2014 +0200
+++ b/pidgin/gtkconv.c Sat May 17 15:35:35 2014 +0200
@@ -602,7 +602,9 @@
{
PurpleConversation *conv = gtkconv->active_conv;
PurpleAccount *account;
+#if 0
PurpleConnection *gc;
+#endif
PurpleMessageFlags flags = 0;
char *buf;
@@ -634,9 +636,9 @@
if (strstr(buf, "<img ") != NULL)
flags |= PURPLE_MESSAGE_IMAGES;
- gc = NULL/*purple_account_get_connection(account)*/;
+#if 0
+ gc = purple_account_get_connection(account);
if (gc && (purple_conversation_get_features(conv) & PURPLE_CONNECTION_FLAG_NO_NEWLINES)) {
-#if 0
/* TODO WebKit */
char **bufs;
int i;
@@ -648,9 +650,9 @@
}
g_strfreev(bufs);
+ } else
#endif
-
- } else {
+ {
send_history_add(gtkconv, buf);
purple_conversation_send_with_flags(conv, buf, flags);
}
@@ -4340,8 +4342,10 @@
purple_chat_user_set_ui_data(cb, gtk_tree_row_reference_new(tm, newpath));
gtk_tree_path_free(newpath);
+#if 0
if (is_me && color)
gdk_color_free(color);
+#endif
g_free(alias_key);
}