Commit 4ad8dceb authored by Leesoo Ahn's avatar Leesoo Ahn

flattenlistmodel: Fix uninitialized variable warning

Variable, added, would be a garbage value if model is NULL and
the following code, if condition, use the uninitialized variable.
A side effect could be occurred by that.

To avoid, the variable is initialized to zero.
parent a966b90e
......@@ -480,7 +480,7 @@ void
gtk_flatten_list_model_set_model (GtkFlattenListModel *self,
GListModel *model)
{
guint removed, added;
guint removed, added = 0;
g_return_if_fail (GTK_IS_FLATTEN_LIST_MODEL (self));
g_return_if_fail (model == NULL || G_IS_LIST_MODEL (model));
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment