From: John Darrington Date: Sat, 27 Oct 2012 05:34:20 +0000 (+0200) Subject: logistic.c : Avoid compiler warnings X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=f7000150d3878ffbb5af306b39c97ed6502ebeb2;p=pspp logistic.c : Avoid compiler warnings --- 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) {