pidgin: 05a46b01: Initialize parent_iter to prevent clang-...

qulogic at qulogic at
Thu Dec 22 04:40:56 EST 2011

Revision: 05a46b01871abad0a37955e1bdb47984dd7beea0
Parent:   13d705220c87a34a0e4f1bcecb6c5caddddf6518
Author:   qulogic at
Date:     12/22/11 02:31:50
Branch:   im.pidgin.pidgin


Initialize parent_iter to prevent clang-analyzer from complaining.

In fact, it's not a problem. If the node is not a group, then it
has a group as a parent. If it is a group, then sort_method_none
will be called, which checks node->parent before using the iter.
But clang-analyzer can't know these things.

Changes against parent 13d705220c87a34a0e4f1bcecb6c5caddddf6518

  patched  pidgin/gtkblist.c

-------------- next part --------------
--- pidgin/gtkblist.c	915cf2b871dc9542f31877d93f8efaa17b3af0df
+++ pidgin/gtkblist.c	1138beed640ecb13f197cfe427782fe2b2221ea5
@@ -6225,7 +6225,7 @@ static gboolean insert_node(PurpleBuddyL
 static gboolean insert_node(PurpleBuddyList *list, PurpleBlistNode *node, GtkTreeIter *iter)
-	GtkTreeIter parent_iter, cur, *curptr = NULL;
+	GtkTreeIter parent_iter = {0, NULL, NULL, NULL}, cur, *curptr = NULL;
 	struct _pidgin_blist_node *gtknode = purple_blist_node_get_ui_data(node);
 	GtkTreePath *newpath;

More information about the Commits mailing list