logistic.c : Avoid compiler warnings
authorJohn Darrington <john@darrington.wattle.id.au>
Sat, 27 Oct 2012 05:34:20 +0000 (07:34 +0200)
committerJohn Darrington <john@darrington.wattle.id.au>
Sat, 27 Oct 2012 05:34:20 +0000 (07:34 +0200)
src/language/stats/logistic.c

index 1a9e313477c3fa6e5b294273d5a4c138386fe44c..fb9a26521a7273a948641de57fc07a0438d0c020 100644 (file)
@@ -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)
     {