Skip to content

Commit

Permalink
Fixed uninitialized variable warning in dmax.c by initializing dp, dp…
Browse files Browse the repository at this point in the history
…_max, dm, and dm_max to 0.0.
  • Loading branch information
Shubham Vasudeo Desai committed Jul 7, 2024
1 parent 559e088 commit 861113d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/cdhc/dmax.c
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down

0 comments on commit 861113d

Please sign in to comment.