/pidgin/main: 716cbef8d1c6: Fix a number of additional trivial i...

Daniel Atallah datallah at pidgin.im
Tue Feb 26 19:00:09 EST 2013


Changeset: 716cbef8d1c6fc93dcdf58d450af717d32cc6384
Author:	 Daniel Atallah <datallah at pidgin.im>
Date:	 2013-02-26 18:57 -0500
Branch:	 release-2.x.y
URL: https://hg.pidgin.im/pidgin/main/rev/716cbef8d1c6

Description:

Fix a number of additional trivial issues - unused variables, etc.

diffstat:

 libpurple/plugin.c                                 |   2 +-
 libpurple/pounce.c                                 |   2 +-
 libpurple/protocols/jabber/google/google_session.c |  13 ++++++-------
 libpurple/protocols/novell/nmrtf.c                 |   1 -
 pidgin/gtkmain.c                                   |   5 ++---
 pidgin/gtkpounce.c                                 |   6 ++----
 pidgin/gtkutils.c                                  |   6 ++----
 7 files changed, 14 insertions(+), 21 deletions(-)

diffs (146 lines):

diff --git a/libpurple/plugin.c b/libpurple/plugin.c
--- a/libpurple/plugin.c
+++ b/libpurple/plugin.c
@@ -1375,7 +1375,7 @@ purple_plugins_probe(const char *ext)
 				path = g_build_filename(search_path, file, NULL);
 
 				if (ext == NULL || has_file_extension(file, ext))
-					plugin = purple_plugin_probe(path);
+					purple_plugin_probe(path);
 
 				g_free(path);
 			}
diff --git a/libpurple/pounce.c b/libpurple/pounce.c
--- a/libpurple/pounce.c
+++ b/libpurple/pounce.c
@@ -220,7 +220,7 @@ pounce_to_xmlnode(PurplePounce *pounce)
 	g_hash_table_foreach(pounce->actions, action_parameter_list_to_xmlnode, child);
 
 	if (purple_pounce_get_save(pounce))
-		child = xmlnode_new_child(node, "save");
+		xmlnode_new_child(node, "save");
 
 	return node;
 }
diff --git a/libpurple/protocols/jabber/google/google_session.c b/libpurple/protocols/jabber/google/google_session.c
--- a/libpurple/protocols/jabber/google/google_session.c
+++ b/libpurple/protocols/jabber/google/google_session.c
@@ -501,8 +501,7 @@ jabber_google_relay_response_session_han
 
 	for (codec_element = xmlnode_get_child(session->description, "payload-type");
 	     codec_element; codec_element = codec_element->next) {
-		const char *id, *encoding_name,  *clock_rate,
-				*width, *height, *framerate;
+		const char *id, *encoding_name,  *clock_rate;
 		gboolean video;
 		if (codec_element->name &&
 				strcmp(codec_element->name, "payload-type"))
@@ -518,10 +517,10 @@ jabber_google_relay_response_session_han
 					codec_element, "clockrate");
 			video = FALSE;
 		} else {
-			width = xmlnode_get_attrib(codec_element, "width");
+			/*width = xmlnode_get_attrib(codec_element, "width");
 			height = xmlnode_get_attrib(codec_element, "height");
 			framerate = xmlnode_get_attrib(
-					codec_element, "framerate");
+					codec_element, "framerate");*/
 			clock_rate = "90000";
 			video = TRUE;
 		}
@@ -716,7 +715,7 @@ google_session_handle_accept(JabberStrea
 
 	for (; codec_element; codec_element = codec_element->next) {
 		const gchar *xmlns, *encoding_name, *id,
-				*clock_rate, *width, *height, *framerate;
+				*clock_rate;
 		gboolean video_codec = FALSE;
 
 		if (!purple_strequal(codec_element->name, "payload-type"))
@@ -731,10 +730,10 @@ google_session_handle_accept(JabberStrea
 					codec_element, "clockrate");
 		else {
 			clock_rate = "90000";
-			width = xmlnode_get_attrib(codec_element, "width");
+			/*width = xmlnode_get_attrib(codec_element, "width");
 			height = xmlnode_get_attrib(codec_element, "height");
 			framerate = xmlnode_get_attrib(
-					codec_element, "framerate");
+					codec_element, "framerate");*/
 			video_codec = TRUE;
 		}
 
diff --git a/libpurple/protocols/novell/nmrtf.c b/libpurple/protocols/novell/nmrtf.c
--- a/libpurple/protocols/novell/nmrtf.c
+++ b/libpurple/protocols/novell/nmrtf.c
@@ -315,7 +315,6 @@ get_current_encoding(NMRtfContext *ctx)
 			purple_debug_info("novell", "Unhandled font charset %d\n", font->charset);
 			return "CP1252";
 	}
-	return "CP1252";
 }
 
 
diff --git a/pidgin/gtkmain.c b/pidgin/gtkmain.c
--- a/pidgin/gtkmain.c
+++ b/pidgin/gtkmain.c
@@ -485,7 +485,6 @@ int main(int argc, char *argv[])
 #ifdef HAVE_SIGNAL_H
 	int sig_indx;	/* for setting up signal catching */
 	sigset_t sigset;
-	RETSIGTYPE (*prev_sig_disp)(int);
 	char errmsg[BUFSIZ];
 	GIOChannel *signal_channel;
 	GIOStatus signal_status;
@@ -618,7 +617,7 @@ int main(int argc, char *argv[])
 		perror(errmsg);
 	}
 	for(sig_indx = 0; catch_sig_list[sig_indx] != -1; ++sig_indx) {
-		if((prev_sig_disp = signal(catch_sig_list[sig_indx], sighandler)) == SIG_ERR) {
+		if(signal(catch_sig_list[sig_indx], sighandler) == SIG_ERR) {
 			snprintf(errmsg, sizeof(errmsg), "Warning: couldn't set signal %d for catching",
 				catch_sig_list[sig_indx]);
 			perror(errmsg);
@@ -630,7 +629,7 @@ int main(int argc, char *argv[])
 		}
 	}
 	for(sig_indx = 0; ignore_sig_list[sig_indx] != -1; ++sig_indx) {
-		if((prev_sig_disp = signal(ignore_sig_list[sig_indx], SIG_IGN)) == SIG_ERR) {
+		if(signal(ignore_sig_list[sig_indx], SIG_IGN) == SIG_ERR) {
 			snprintf(errmsg, sizeof(errmsg), "Warning: couldn't set signal %d to ignore",
 				ignore_sig_list[sig_indx]);
 			perror(errmsg);
diff --git a/pidgin/gtkpounce.c b/pidgin/gtkpounce.c
--- a/pidgin/gtkpounce.c
+++ b/pidgin/gtkpounce.c
@@ -1410,10 +1410,8 @@ pounce_cb(PurplePounce *pounce, PurplePo
 
 	if (purple_pounce_action_is_enabled(pounce, "open-window"))
 	{
-		conv = purple_find_conversation_with_account(PURPLE_CONV_TYPE_IM, pouncee, account);
-
-		if (conv == NULL)
-			conv = purple_conversation_new(PURPLE_CONV_TYPE_IM, account, pouncee);
+		if (!purple_find_conversation_with_account(PURPLE_CONV_TYPE_IM, pouncee, account))
+			purple_conversation_new(PURPLE_CONV_TYPE_IM, account, pouncee);
 	}
 
 	if (purple_pounce_action_is_enabled(pounce, "popup-notify"))
diff --git a/pidgin/gtkutils.c b/pidgin/gtkutils.c
--- a/pidgin/gtkutils.c
+++ b/pidgin/gtkutils.c
@@ -1661,12 +1661,10 @@ pidgin_dnd_file_manage(GtkSelectionData 
 			const char *itemname = NULL;
 
 			const char * const *langs;
-			int i;
 			langs = g_get_language_names();
-			for (i = 0; langs[i]; i++) {
-				g_snprintf(key, sizeof(key), "Name[%s]", langs[i]);
+			if (langs[0]) {
+				g_snprintf(key, sizeof(key), "Name[%s]", langs[0]);
 				itemname = purple_desktop_item_get_string(item, key);
-				break;
 			}
 
 			if (!itemname)



More information about the Commits mailing list