Misc. clang static analyzer fixes

This commit is contained in:
Émilie Feral
2020-12-08 10:45:49 +01:00
committed by LeaNumworks
parent c3ceb0074f
commit fe4e2e3e9d
5 changed files with 5 additions and 1 deletions

View File

@@ -64,6 +64,7 @@ void Model::fitLevenbergMarquardt(Store * store, int series, double * modelCoeff
while (smallChi2ChangeCounts < k_consecutiveSmallChi2ChangesLimit && iterationCount < k_maxIterations) {
// Create the alpha prime matrix (it is symmetric)
double coefficientsAPrime[Model::k_maxNumberOfCoefficients * Model::k_maxNumberOfCoefficients];
assert(n > 0); // Ensure that coefficientsAPrime is initialized
for (int i = 0; i < n; i++) {
for (int j = i; j < n; j++) {
double alphaPrime = alphaPrimeCoefficient(store, series, modelCoefficients, i, j, lambda);