Closed MartinSalinas98 closed 1 year ago
Realising offsets were actually there for a reason (who would have thought), removing the compiler warning without actually compromising behaviour might need to be done differently.
The problem is caused by numerical_recipes.cpp
declaring and working with every array starting at index 1
instead of the regular and beloved 0
.
The compilation warnings can be easily avoided without breaking functionality, but it does not solve the underlying massive structural change this ~10000 lines file needs.
This would need a bigger refactor that presented here initially.
Why. Just why.
This PR needs to merge Xmipp's 765 first, it won't compile in the meantime because Xmipp uses a function removed in this PR, but linked PR changes that so it won't use it any more.
Kudos, SonarCloud Quality Gate passed!
This warnings were about calls to
free
with offset, wich can cause unexpected behaviour since the free should be called pointing to the start of the array. This changes should not affect the proper behaviour of the code (if anything, it could fix it in some situations).This might be needed to solve issues with Xmipp PR 764.
PS: How could we test if those changes work as intented?