summaryrefslogtreecommitdiff
path: root/gtk/a11y
diff options
context:
space:
mode:
authorPhilip Withnall <philip.withnall@collabora.co.uk>2013-11-20 17:25:25 +0000
committerPhilip Withnall <philip.withnall@collabora.co.uk>2013-12-02 10:36:26 +0000
commit480a005039bc676489d438c4374cc6f579b9aa4b (patch)
tree12fc1f6346d89eb117ced2696a3d3ed3769f973c /gtk/a11y
parent087b61f65309b5cf81480a4caa7cf36a5c5bb2db (diff)
downloadgtk+-480a005039bc676489d438c4374cc6f579b9aa4b.tar.gz
gtktreeviewaccessible: Fix potential uses of uninitialised variables
Found with scan-build. https://bugzilla.gnome.org/show_bug.cgi?id=712760
Diffstat (limited to 'gtk/a11y')
-rw-r--r--gtk/a11y/gtktreeviewaccessible.c14
1 files changed, 12 insertions, 2 deletions
diff --git a/gtk/a11y/gtktreeviewaccessible.c b/gtk/a11y/gtktreeviewaccessible.c
index 21e86b32e5..a3a11201c5 100644
--- a/gtk/a11y/gtktreeviewaccessible.c
+++ b/gtk/a11y/gtktreeviewaccessible.c
@@ -762,7 +762,11 @@ gtk_tree_view_accessible_get_selected_rows (AtkTable *table,
widget = gtk_accessible_get_widget (GTK_ACCESSIBLE (table));
if (widget == NULL)
- return 0;
+ {
+ if (rows_selected != NULL)
+ *rows_selected = NULL;
+ return 0;
+ }
data.treeview = GTK_TREE_VIEW (widget);
data.array = g_array_new (FALSE, FALSE, sizeof (gint));
@@ -1016,6 +1020,12 @@ gtk_tree_view_accessible_get_cell_area (GtkCellAccessibleParent *parent,
GtkTreeViewAccessibleCellInfo *cell_info;
GtkCellAccessible *top_cell;
+ /* Default value. */
+ cell_rect->x = 0;
+ cell_rect->y = 0;
+ cell_rect->width = 0;
+ cell_rect->height = 0;
+
widget = gtk_accessible_get_widget (GTK_ACCESSIBLE (parent));
if (widget == NULL)
return;
@@ -1256,7 +1266,7 @@ gtk_tree_view_accessible_get_renderer_state (GtkCellAccessibleParent *parent,
GtkTreeViewColumn *column;
GtkTreePath *path;
GtkRBTree *tree;
- GtkRBNode *node;
+ GtkRBNode *node = NULL;
gtk_tree_view_get_cursor (treeview, &path, &column);
if (path)