diff --git a/mex/sources/estimation/libmat/Matrix.hh b/mex/sources/estimation/libmat/Matrix.hh index 18f1776fc..b2ffdb20f 100644 --- a/mex/sources/estimation/libmat/Matrix.hh +++ b/mex/sources/estimation/libmat/Matrix.hh @@ -519,7 +519,7 @@ namespace mat reorderColumnsByVectors(Mat1 &a, const std::vector &vToCols, const Mat2 &b, const std::vector &vcols) { - size_t nrows = a.getRows(), ncols = 0, toncols = 0; + size_t ncols = 0, toncols = 0; const std::vector *vpToCols = 0, *vpCols = 0; std::vector tmpvpToCols(0), tmpvpCols(0); assert(b.getRows() == a.getRows()); @@ -579,7 +579,7 @@ namespace mat reorderRowsByVectors(Mat1 &a, const std::vector &vToRows, const Mat2 &b, const std::vector &vrows) { - size_t nrows = 0, tonrows = 0, ncols = a.getCols(); + size_t nrows = 0, tonrows = 0; const std::vector *vpToRows = 0, *vpRows = 0; std::vector tmpvpToRows(0), tmpvpRows(0); diff --git a/mex/sources/estimation/libmat/tests/test-repmat.cc b/mex/sources/estimation/libmat/tests/test-repmat.cc index 3ce97c82d..f8581eea3 100644 --- a/mex/sources/estimation/libmat/tests/test-repmat.cc +++ b/mex/sources/estimation/libmat/tests/test-repmat.cc @@ -34,10 +34,10 @@ main(int argc, char **argv) Matrix S1(m, 2 *n), S2(2*m, n); std::vector toC(n), toR(m); - for (int i = 0; i < n; i++) + for (size_t i = 0; i < n; i++) toC[i] = 2*i; - for (int j = 0; j < m; j++) + for (size_t j = 0; j < m; j++) toR[j] = m-j-1; mat::assignByVectors(S1, mat::nullVec, toC, S, mat::nullVec, mat::nullVec);