From d90d7a006f7e9aba7d06013faa305bd527093ff2 Mon Sep 17 00:00:00 2001 From: Benoit Jacob Date: Tue, 3 Aug 2010 10:38:48 -0400 Subject: [PATCH] fix warnings. The one in Reverse was potentially serious: coeff() methods should return CoeffReturnType, not "Scalar", if the expression is potentially a Lvalue. --- Eigen/src/Core/Reverse.h | 4 ++-- Eigen/src/Core/products/GeneralMatrixVector.h | 7 +++++-- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/Eigen/src/Core/Reverse.h b/Eigen/src/Core/Reverse.h index 6051f7366..abc44bde6 100644 --- a/Eigen/src/Core/Reverse.h +++ b/Eigen/src/Core/Reverse.h @@ -126,13 +126,13 @@ template class Reverse ReverseCol ? m_matrix.cols() - col - 1 : col); } - inline const Scalar coeff(Index row, Index col) const + inline CoeffReturnType coeff(Index row, Index col) const { return m_matrix.coeff(ReverseRow ? m_matrix.rows() - row - 1 : row, ReverseCol ? m_matrix.cols() - col - 1 : col); } - inline const Scalar coeff(Index index) const + inline CoeffReturnType coeff(Index index) const { return m_matrix.coeff(m_matrix.size() - index - 1); } diff --git a/Eigen/src/Core/products/GeneralMatrixVector.h b/Eigen/src/Core/products/GeneralMatrixVector.h index 44986dc16..96a038b05 100644 --- a/Eigen/src/Core/products/GeneralMatrixVector.h +++ b/Eigen/src/Core/products/GeneralMatrixVector.h @@ -63,8 +63,11 @@ EIGEN_DONT_INLINE static void run( Index rows, Index cols, const LhsScalar* lhs, Index lhsStride, const RhsScalar* rhs, Index rhsIncr, - ResScalar* res, Index resIncr, - RhsScalar alpha) + ResScalar* res, Index + #ifdef EIGEN_INTERNAL_DEBUGGING + resIncr + #endif + , RhsScalar alpha) { ei_internal_assert(resIncr==1); #ifdef _EIGEN_ACCUMULATE_PACKETS