From: Julien Schueller Date: Thu, 24 Aug 2017 08:38:35 +0000 (+0200) Subject: avoid initializing global variable with HUGE_VAL X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?a=commitdiff_plain;h=bb45d7721419523fc2adc94a0d04105a5c5f3d42;p=nlopt.git avoid initializing global variable with HUGE_VAL --- diff --git a/test/testopt.c b/test/testopt.c index 147882c..5625d85 100644 --- a/test/testopt.c +++ b/test/testopt.c @@ -48,7 +48,7 @@ extern "C" int feenableexcept (int EXCEPTS); #include "testfuncs.h" static nlopt_algorithm algorithm = NLOPT_GN_DIRECT_L; -static double ftol_rel = 0, ftol_abs = 0, xtol_rel = 0, xtol_abs = 0, minf_max_delta = -HUGE_VAL; +static double ftol_rel = 0, ftol_abs = 0, xtol_rel = 0, xtol_abs = 0, minf_max_delta; static int maxeval = 1000, iterations = 1, center_start = 0; static double maxtime = 0.0; static double xinit_tol = -1; @@ -298,7 +298,8 @@ int main(int argc, char **argv) nlopt_srand_time(); testfuncs_verbose = 0; - + minf_max_delta = -HUGE_VAL; + if (argc <= 1) usage(stdout);