diff --git a/.github/releaseBody.md b/.github/releaseBody.md index cc11bb8..5f543fc 100644 --- a/.github/releaseBody.md +++ b/.github/releaseBody.md @@ -1,7 +1,6 @@ -## Significant improvement of `GaussNewton_Sens_Cal` +## Removed warning in `GaussNewton_Sens_Cal` -**New features:** -- `GaussNewton_Sens_Cal` can now calculate automatically both sphere radius and starting conditions, that are no longer needed as input parameters -- `GaussNewton_Sens_Cal` returns now an error if `NaN` is detected +**Bugfix:** +- Initialized some variables in `GaussNewton_Sens_Cal` to avoid a `-Wmaybe-uninitialized` warning See [Changelog](Changelog.md) \ No newline at end of file diff --git a/Changelog.md b/Changelog.md index 3e26c23..67d0567 100644 --- a/Changelog.md +++ b/Changelog.md @@ -1,5 +1,10 @@ # Changelog +## v1.8.1 + +**Bugfix:** +- Initialized some variables in `GaussNewton_Sens_Cal` to avoid a `-Wmaybe-uninitialized` warning + ## v1.8.0 **New features:** diff --git a/src/numMethods.c b/src/numMethods.c index e8b9fa1..f62c15f 100644 --- a/src/numMethods.c +++ b/src/numMethods.c @@ -371,7 +371,7 @@ void LinSolveGauss(matrix_t* A, matrix_t* B, matrix_t* result) { utilsStatus_t GaussNewton_Sens_Cal_9(matrix_t* Data, float k, matrix_t* X0, uint16_t nmax, float tol, matrix_t* result) { - float d1, d2, d3, rx1, rx2, rx3, t1, t2, t3; + float d1 = 0, d2 = 0, d3 = 0, rx1, rx2, rx3, t1, t2, t3; float k2; matrix_t Jr, res, delta, tmp1; matrixInit(&Jr, Data->rows, 9); @@ -481,7 +481,7 @@ utilsStatus_t GaussNewton_Sens_Cal_9(matrix_t* Data, float k, matrix_t* X0, uint utilsStatus_t GaussNewton_Sens_Cal_6(matrix_t* Data, float k, matrix_t* X0, uint16_t nmax, float tol, matrix_t* result) { - float d1, d2, d3, t1, t2, t3; + float d1 = 0, d2 = 0, d3 = 0, t1, t2, t3; float k2; matrix_t Jr, res, delta, tmp1;