From 7f5ffa59491b749e3ae428872fafad47a60bf2f5 Mon Sep 17 00:00:00 2001 From: rnhmjoj Date: Mon, 8 Jun 2020 11:44:31 +0000 Subject: [PATCH] ex-1: fix uninitialised variable warning --- ex-1/tests.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ex-1/tests.c b/ex-1/tests.c index 52352cc..a8c8a94 100644 --- a/ex-1/tests.c +++ b/ex-1/tests.c @@ -95,7 +95,7 @@ double numeric_mode(double min, double max, double x = 0; int max_iter = 100; double prec = 1e-7; - int status; + int status = GSL_CONTINUE; const gsl_min_fminimizer_type *T = gsl_min_fminimizer_brent; gsl_min_fminimizer *s = gsl_min_fminimizer_alloc(T); gsl_min_fminimizer_set(s, &npdf, x, min, max);