Fix various asan errors.

This commit is contained in:
Antonio Sánchez
2024-01-08 00:13:17 +00:00
parent a2cf99ec6f
commit 3026f1f296
4 changed files with 55 additions and 42 deletions

View File

@@ -309,6 +309,7 @@ bool saveMarket(const SparseMatrixType& mat, const std::string& filename, int sy
out << header << std::endl;
out << mat.rows() << " " << mat.cols() << " " << mat.nonZeros() << "\n";
int count = 0;
EIGEN_UNUSED_VARIABLE(count);
for (int j = 0; j < mat.outerSize(); ++j)
for (typename SparseMatrixType::InnerIterator it(mat, j); it; ++it) {
++count;