From 27d51ce1d7a5e1f729f069078fade51e126db15f Mon Sep 17 00:00:00 2001 From: Dirk Hohndel Date: Fri, 25 Jan 2013 15:55:18 -0800 Subject: Fix potential uninitialized variable access There are paths through this function that reach the comparison at the end of it without trip_a and/or trip_b being initialized. Signed-off-by: Dirk Hohndel --- divelist.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'divelist.c') diff --git a/divelist.c b/divelist.c index 8b86c5343..245ff4499 100644 --- a/divelist.c +++ b/divelist.c @@ -1472,7 +1472,7 @@ static gint dive_nr_sort(GtkTreeModel *model, int idx_a, idx_b; timestamp_t when_a, when_b; struct dive *a, *b; - dive_trip_t *tripa,*tripb; + dive_trip_t *tripa = NULL, *tripb = NULL; gtk_tree_model_get(model, iter_a, DIVE_INDEX, &idx_a, DIVE_DATE, &when_a, -1); gtk_tree_model_get(model, iter_b, DIVE_INDEX, &idx_b, DIVE_DATE, &when_b, -1); -- cgit v1.2.3-70-g09d2