Fix a bunch of random warnings

Sat, 08 Aug 2020 23:42:30 -0500

author
Gary Kramlich <grim@reaperworld.com>
date
Sat, 08 Aug 2020 23:42:30 -0500
changeset 40504
413ef6af21ab
parent 40503
af35bc5fc875
child 40505
e2c4be9e3aa6

Fix a bunch of random warnings

Testing Done:
Just compile testing and output review. Most of these were just unused variables, the `g_hash_table_lookup_exteneded` was just a type warning.

Reviewed at https://reviews.imfreedom.org/r/65/

pidgin/gtkconv.c file | annotate | diff | comparison | revisions
pidgin/gtkprefs.c file | annotate | diff | comparison | revisions
pidgin/gtkstatusbox.c file | annotate | diff | comparison | revisions
pidgin/gtkutils.c file | annotate | diff | comparison | revisions
pidgin/pidginaccountsmenu.c file | annotate | diff | comparison | revisions
--- a/pidgin/gtkconv.c	Sat Aug 08 23:41:28 2020 -0500
+++ b/pidgin/gtkconv.c	Sat Aug 08 23:42:30 2020 -0500
@@ -1844,7 +1844,6 @@
 {
 	PidginConversation *gtkconv;
 	PurpleConversation *old_conv;
-	PurpleConnectionFlags features;
 
 	g_return_if_fail(conv != NULL);
 
--- a/pidgin/gtkprefs.c	Sat Aug 08 23:41:28 2020 -0500
+++ b/pidgin/gtkprefs.c	Sat Aug 08 23:42:30 2020 -0500
@@ -1656,8 +1656,6 @@
 static void
 bind_interface_page(PidginPrefsWindow *win)
 {
-	GList *names = NULL;
-
 	/* System Tray */
 	win->iface.im.hide_new.type = PURPLE_PREF_STRING;
 	win->iface.im.hide_new.key = PIDGIN_PREFS_ROOT "/conversations/im/hide_new";
--- a/pidgin/gtkstatusbox.c	Sat Aug 08 23:41:28 2020 -0500
+++ b/pidgin/gtkstatusbox.c	Sat Aug 08 23:42:30 2020 -0500
@@ -1163,7 +1163,6 @@
 static void
 pidgin_status_box_list_position (PidginStatusBox *status_box, int *x, int *y, int *width, int *height)
 {
-	gint monitor_num;
 	GdkMonitor *m = NULL;
 	GdkRectangle monitor;
 	GtkRequisition popup_req;
--- a/pidgin/gtkutils.c	Sat Aug 08 23:41:28 2020 -0500
+++ b/pidgin/gtkutils.c	Sat Aug 08 23:42:30 2020 -0500
@@ -944,7 +944,6 @@
 	size_t size;
 	GStatBuf st;
 	GError *err = NULL;
-	PurpleConversation *conv;
 	PurpleBuddy *buddy;
 	PurpleContact *contact;
 	PurpleImage *img;
--- a/pidgin/pidginaccountsmenu.c	Sat Aug 08 23:41:28 2020 -0500
+++ b/pidgin/pidginaccountsmenu.c	Sat Aug 08 23:42:30 2020 -0500
@@ -78,10 +78,14 @@
                                          PurpleAccount *account)
 {
 	GtkWidget *item = NULL, *submenu = NULL;
+	gpointer data = NULL;
+	gboolean found = FALSE;
 
 	/* if the account is in the disabled list, delete its widget */
-	if (g_hash_table_lookup_extended(menu->disabled_items, account, NULL, &item)) {
-		g_clear_pointer(&item, gtk_widget_destroy);
+	found = g_hash_table_lookup_extended(menu->disabled_items, account, NULL,
+	                                     &data);
+	if(found) {
+		g_clear_pointer(&data, gtk_widget_destroy);
 		g_hash_table_remove(menu->disabled_items, account);
 	}
 
@@ -103,10 +107,14 @@
                                           PurpleAccount *account)
 {
 	GtkWidget *item = NULL;
+	gpointer data = NULL;
+	gboolean found = FALSE;
 
 	/* if the account is in the enabled list, delete its widget */
-	if (g_hash_table_lookup_extended(menu->account_items, account, NULL, &item)) {
-		g_clear_pointer(&item, gtk_widget_destroy);
+	found = g_hash_table_lookup_extended(menu->account_items, account, NULL,
+	                                     &data);
+	if(found) {
+		g_clear_pointer(&data, gtk_widget_destroy);
 		g_hash_table_remove(menu->account_items, account);
 	}
 

mercurial