pidgin/pidgin

Fix some issues scanbuild found

7 weeks ago, Gary Kramlich
ba5964adbf7f
Parents 06dcfb1cc1b2
Children 01b94846bb60
Fix some issues scanbuild found

Testing Done:
ran `ninja scan-build` and verified the issues were resolved.

Reviewed at https://reviews.imfreedom.org/r/1585/
--- a/libpurple/protocols/irc/msgs.c Sat Aug 13 22:06:44 2022 -0500
+++ b/libpurple/protocols/irc/msgs.c Sat Aug 13 22:08:20 2022 -0500
@@ -1643,7 +1643,7 @@
return;
}
- if ((ret = sasl_client_init(NULL)) != SASL_OK) {
+ if (sasl_client_init(NULL) != SASL_OK) {
purple_connection_take_error(gc, g_error_new_literal(
PURPLE_CONNECTION_ERROR,
PURPLE_CONNECTION_ERROR_OTHER_ERROR,
--- a/pidgin/gtkblist.c Sat Aug 13 22:06:44 2022 -0500
+++ b/pidgin/gtkblist.c Sat Aug 13 22:08:20 2022 -0500
@@ -1619,7 +1619,7 @@
g_simple_action_set_enabled(G_SIMPLE_ACTION(action), enabled);
/* Now display the menu */
- if (menu != NULL) {
+ if (menu != NULL && event != NULL) {
GtkWidget *popover_menu = gtk_popover_menu_new();
gtk_popover_bind_model(GTK_POPOVER(popover_menu), G_MENU_MODEL(menu),
--- a/pidgin/gtkconv.c Sat Aug 13 22:06:44 2022 -0500
+++ b/pidgin/gtkconv.c Sat Aug 13 22:08:20 2022 -0500
@@ -513,7 +513,6 @@
PurpleAccount *account = purple_conversation_get_account(conv);
gboolean is_me = FALSE;
GtkWidget *button;
- PurpleBuddy *buddy = NULL;
if (gc != NULL)
protocol = purple_connection_get_protocol(gc);
@@ -601,7 +600,7 @@
}
if (!is_me && protocol && !(purple_protocol_get_options(protocol) & OPT_PROTO_UNIQUE_CHATNAME) && PURPLE_PROTOCOL_IMPLEMENTS(protocol, SERVER, add_buddy)) {
- if ((buddy = purple_blist_find_buddy(account, who)) != NULL)
+ if (purple_blist_find_buddy(account, who) != NULL)
button = pidgin_new_menu_item(menu, _("Remove"),
NULL,
G_CALLBACK(menu_chat_add_remove_cb),