Closed ahundt closed 9 years ago
Thanks @ahundt for doing a static code analysis. I am leaving the DBoW2 code unchanged, as it is a 3rd-party library. For Ceres, yes, we should update the version as the currently used version differs substantially from the latest version. However, I will KIV this as I do not have time, and CamOdoCal works fine with the currently used version. I fixed the memory deallocation issue in camodocal/src/sparse_graph/SparseGraph.cc. I checked the rest of the errors, and I think they are not valid, as the highlighted code seems correct to me.
There are a number of logic errors found by static analysis that lead to junk data and calculations in the code. Some of them are in functions that look pretty important, I included the most important ones below.
Some of these are from ceres, so I don't know if it may be worthwhile to update the version.
There are also quite a few "dead stores", or values that are set or defined but never read, they just eat up CPU/memory and are less critical so I left them out to keep the scope of problems to the important ones for this issue.