From f7000150d3878ffbb5af306b39c97ed6502ebeb2 Mon Sep 17 00:00:00 2001 From: John Darrington Date: Sat, 27 Oct 2012 07:34:20 +0200 Subject: [PATCH] logistic.c : Avoid compiler warnings --- src/language/stats/logistic.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/language/stats/logistic.c b/src/language/stats/logistic.c index 1a9e313477..fb9a26521a 100644 --- a/src/language/stats/logistic.c +++ b/src/language/stats/logistic.c @@ -440,9 +440,9 @@ run_lr (const struct lr_spec *cmd, struct casereader *input, gsl_vector *se ; bool converged = false; - double likelihood; + double likelihood = -1; double prev_likelihood = -1; - double initial_likelihood ; + double initial_likelihood = -1; struct lr_result work; work.n_missing = 0; @@ -535,6 +535,7 @@ run_lr (const struct lr_spec *cmd, struct casereader *input, break; } casereader_destroy (input); + assert (initial_likelihood >= 0); for (i = 0; i < se->size; ++i) { -- 2.30.2