pidgin/pidgin

33d7e6abb37f
Parents a8d60f091a56
Children d575d71dcc56
Fix a few random issues that scanbuild found.

Testing Done:
Ran scanbuild locally, verfied the issues were no longer found.

Reviewed at https://reviews.imfreedom.org/r/277/
--- a/pidgin/gtkblist.c Mon Dec 14 23:55:58 2020 -0600
+++ b/pidgin/gtkblist.c Thu Dec 17 20:15:43 2020 -0600
@@ -3045,7 +3045,7 @@
pidgin_blist_create_tooltip_for_node(GtkWidget *widget, gpointer data, int *w, int *h)
{
PurpleBlistNode *node = data;
- int width, height;
+ int width = 0, height = 0;
GList *list;
int max_text_width = 0;
int max_avatar_width = 0;
@@ -3097,7 +3097,6 @@
return FALSE;
}
- height = width = 0;
for (list = gtkblist->tooltipdata; list; list = list->next) {
struct tooltip_data *td = list->data;
max_text_width = MAX(max_text_width, MAX(td->width, td->name_width));
--- a/pidgin/gtkconv.c Mon Dec 14 23:55:58 2020 -0600
+++ b/pidgin/gtkconv.c Thu Dec 17 20:15:43 2020 -0600
@@ -3367,7 +3367,7 @@
gtkchat = gtkconv->u.chat;
gc = purple_conversation_get_connection(conv);
- if (!gc || !(protocol = purple_connection_get_protocol(gc)))
+ if (!gc || !purple_connection_get_protocol(gc))
return;
tm = gtk_tree_view_get_model(GTK_TREE_VIEW(gtkchat->list));
--- a/pidgin/gtkprefs.c Mon Dec 14 23:55:58 2020 -0600
+++ b/pidgin/gtkprefs.c Thu Dec 17 20:15:43 2020 -0600
@@ -3211,7 +3211,7 @@
video_sink = purple_prefs_get_string(PIDGIN_PREFS_ROOT "/vvconfig/video/sink/device");
if (purple_strequal(video_sink, "glimagesink") || purple_strequal(video_sink, "directdrawsink")) {
/* Accelerated sinks move to GTK GL. */
- video_sink = "gtkglsink";
+ /* video_sink = "gtkglsink"; */
/* FIXME: I haven't been able to get gtkglsink to work yet: */
video_sink = "gtksink";
} else {
--- a/pidgin/pidginmooddialog.c Mon Dec 14 23:55:58 2020 -0600
+++ b/pidgin/pidginmooddialog.c Thu Dec 17 20:15:43 2020 -0600
@@ -239,7 +239,7 @@
PurpleRequestField *f;
PurpleConnection *gc = NULL;
PurpleProtocol *protocol = NULL;
- PurpleMood *mood;
+ PurpleMood *mood = NULL;
PurpleMood *global_moods = NULL;
if (account) {