From 0e5c6405632e03f80b3e2ff0e6f7c8371c98b023 Mon Sep 17 00:00:00 2001 From: Benoit Jacob Date: Sun, 4 Jan 2009 17:32:20 +0000 Subject: [PATCH] * fix a unused variable warning * if svnversion returns prose such as "exported" then discard that --- CMakeLists.txt | 5 ++++- Eigen/src/Core/MatrixStorage.h | 2 +- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 2cec2d276..ee3fc99ed 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -4,7 +4,10 @@ set(EIGEN_VERSION_NUMBER "2.0-beta4") #if the svnversion program is absent, this will leave the SVN_REVISION string empty, #but won't stop CMake. execute_process(COMMAND svnversion -n ${CMAKE_SOURCE_DIR} - OUTPUT_VARIABLE EIGEN_SVN_REVISION) + OUTPUT_VARIABLE EIGEN_SVNVERSION_OUTPUT) + +#we only want EIGEN_SVN_REVISION if it is an actual revision number, not a string like "exported" +string(REGEX MATCH "^[0-9]+.*" EIGEN_SVN_REVISION "${EIGEN_SVNVERSION_OUTPUT}") if(EIGEN_SVN_REVISION) set(EIGEN_VERSION "${EIGEN_VERSION_NUMBER} (SVN revision ${EIGEN_SVN_REVISION})") diff --git a/Eigen/src/Core/MatrixStorage.h b/Eigen/src/Core/MatrixStorage.h index 7d869579b..fdf5449b7 100644 --- a/Eigen/src/Core/MatrixStorage.h +++ b/Eigen/src/Core/MatrixStorage.h @@ -130,7 +130,7 @@ template class ei_matrix_storage< inline void swap(ei_matrix_storage& other) { std::swap(m_data,other.m_data); std::swap(m_cols,other.m_cols); } inline int rows(void) const {return _Rows;} inline int cols(void) const {return m_cols;} - inline void resize(int size, int, int cols) + inline void resize(int, int, int cols) { m_cols = cols; }