ex-1: fix uninitialised variable warning

This commit is contained in:
Michele Guerini Rocco 2020-06-08 11:44:31 +00:00
parent 2aca14f0c9
commit 7f5ffa5949

View File

@ -95,7 +95,7 @@ double numeric_mode(double min, double max,
double x = 0; double x = 0;
int max_iter = 100; int max_iter = 100;
double prec = 1e-7; double prec = 1e-7;
int status; int status = GSL_CONTINUE;
const gsl_min_fminimizer_type *T = gsl_min_fminimizer_brent; const gsl_min_fminimizer_type *T = gsl_min_fminimizer_brent;
gsl_min_fminimizer *s = gsl_min_fminimizer_alloc(T); gsl_min_fminimizer *s = gsl_min_fminimizer_alloc(T);
gsl_min_fminimizer_set(s, &npdf, x, min, max); gsl_min_fminimizer_set(s, &npdf, x, min, max);