From 861113da21ceb1d02cb0e3a9160698881dffca54 Mon Sep 17 00:00:00 2001 From: Shubham Vasudeo Desai Date: Sun, 7 Jul 2024 18:00:46 -0400 Subject: [PATCH] Fixed uninitialized variable warning in dmax.c by initializing dp, dp_max, dm, and dm_max to 0.0. --- lib/cdhc/dmax.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/cdhc/dmax.c b/lib/cdhc/dmax.c index 8b9638f0c45..8f4fb01cd73 100644 --- a/lib/cdhc/dmax.c +++ b/lib/cdhc/dmax.c @@ -7,7 +7,7 @@ double *Cdhc_dmax(double *x, int n) { static double y[2]; double *xcopy, sqrt2, mean = 0.0, sdx = 0.0, fx; - double dp, dp_max, dm, dm_max; + double dp = 0.0, dp_max = 0.0, dm = 0.0, dm_max = 0.0; int i; if ((xcopy = (double *)malloc(n * sizeof(double))) == NULL) {