aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorGravatar Hauke Heibel <hauke.heibel@gmail.com>2009-12-12 14:49:43 +0100
committerGravatar Hauke Heibel <hauke.heibel@gmail.com>2009-12-12 14:49:43 +0100
commit3dce51bd8eb2cf1e809efac1fc9fbaa6e836655c (patch)
tree41d6d61c263c824174c26a42e3d6cebad3e66139
parentd088ee35f644f9178270f0c3dc8c76011d208099 (diff)
Removed more warnings.
-rw-r--r--Eigen/src/Core/Functors.h4
-rw-r--r--Eigen/src/Core/PermutationMatrix.h3
-rw-r--r--Eigen/src/Core/util/DisableMSVCWarnings.h6
-rw-r--r--Eigen/src/Sparse/DynamicSparseMatrix.h3
-rw-r--r--Eigen/src/Sparse/SparseCwiseBinaryOp.h3
-rw-r--r--cmake/EigenTesting.cmake4
-rw-r--r--test/unalignedassert.cpp1
7 files changed, 21 insertions, 3 deletions
diff --git a/Eigen/src/Core/Functors.h b/Eigen/src/Core/Functors.h
index 259f40244..e2a212c89 100644
--- a/Eigen/src/Core/Functors.h
+++ b/Eigen/src/Core/Functors.h
@@ -365,6 +365,8 @@ struct ei_scalar_multiple2_op {
EIGEN_STRONG_INLINE ei_scalar_multiple2_op(const Scalar2& other) : m_other(other) { }
EIGEN_STRONG_INLINE result_type operator() (const Scalar1& a) const { return a * m_other; }
typename ei_makeconst<typename NumTraits<Scalar2>::Nested>::type m_other;
+private:
+ ei_scalar_multiple2_op& operator=(ei_scalar_multiple2_op&);
};
template<typename Scalar1,typename Scalar2>
struct ei_functor_traits<ei_scalar_multiple2_op<Scalar1,Scalar2> >
@@ -394,6 +396,8 @@ struct ei_scalar_quotient1_impl<Scalar,false> {
EIGEN_STRONG_INLINE ei_scalar_quotient1_impl(const Scalar& other) : m_other(other) {}
EIGEN_STRONG_INLINE Scalar operator() (const Scalar& a) const { return a / m_other; }
typename ei_makeconst<typename NumTraits<Scalar>::Nested>::type m_other;
+private:
+ ei_scalar_quotient1_impl& operator=(const ei_scalar_quotient1_impl&);
};
template<typename Scalar>
struct ei_functor_traits<ei_scalar_quotient1_impl<Scalar,false> >
diff --git a/Eigen/src/Core/PermutationMatrix.h b/Eigen/src/Core/PermutationMatrix.h
index 284baf678..4d30b2dac 100644
--- a/Eigen/src/Core/PermutationMatrix.h
+++ b/Eigen/src/Core/PermutationMatrix.h
@@ -320,6 +320,9 @@ struct ei_permut_matrix_product_retval
protected:
const PermutationType& m_permutation;
const typename MatrixType::Nested m_matrix;
+
+ private:
+ ei_permut_matrix_product_retval& operator=(ei_permut_matrix_product_retval&);
};
#endif // EIGEN_PERMUTATIONMATRIX_H
diff --git a/Eigen/src/Core/util/DisableMSVCWarnings.h b/Eigen/src/Core/util/DisableMSVCWarnings.h
index c08d0389f..18484e490 100644
--- a/Eigen/src/Core/util/DisableMSVCWarnings.h
+++ b/Eigen/src/Core/util/DisableMSVCWarnings.h
@@ -1,6 +1,8 @@
#ifdef _MSC_VER
- // 4273 - QtAlignedMalloc, inconsistent dll linkage
+ // 4273 - QtAlignedMalloc, inconsistent DLL linkage
+ // 4100 - unreferenced formal parameter (occurred e.g. in aligned_allocator::destroy(pointer p))
+ // 4101 - we need this one for the inlining fix
#pragma warning( push )
- #pragma warning( disable : 4181 4244 4127 4211 4273 4522 4717 )
+ #pragma warning( disable : 4100 4101 4181 4244 4127 4211 4273 4522 4717 )
#endif
diff --git a/Eigen/src/Sparse/DynamicSparseMatrix.h b/Eigen/src/Sparse/DynamicSparseMatrix.h
index f4f83533a..00386442c 100644
--- a/Eigen/src/Sparse/DynamicSparseMatrix.h
+++ b/Eigen/src/Sparse/DynamicSparseMatrix.h
@@ -323,6 +323,9 @@ class DynamicSparseMatrix<Scalar,_Flags>::InnerIterator : public SparseVector<Sc
protected:
const int m_outer;
+
+ private:
+ InnerIterator& operator=(InnerIterator&);
};
#endif // EIGEN_DYNAMIC_SPARSEMATRIX_H
diff --git a/Eigen/src/Sparse/SparseCwiseBinaryOp.h b/Eigen/src/Sparse/SparseCwiseBinaryOp.h
index bb93b60ef..01f4da197 100644
--- a/Eigen/src/Sparse/SparseCwiseBinaryOp.h
+++ b/Eigen/src/Sparse/SparseCwiseBinaryOp.h
@@ -297,6 +297,9 @@ class ei_sparse_cwise_binary_op_inner_iterator_selector<ei_scalar_product_op<T>,
LhsIterator m_lhsIter;
const BinaryFunc m_functor;
const int m_outer;
+
+private:
+ ei_sparse_cwise_binary_op_inner_iterator_selector& operator=(ei_sparse_cwise_binary_op_inner_iterator_selector&);
};
// sparse - dense (product)
diff --git a/cmake/EigenTesting.cmake b/cmake/EigenTesting.cmake
index bb1da41de..b8cd63ac1 100644
--- a/cmake/EigenTesting.cmake
+++ b/cmake/EigenTesting.cmake
@@ -237,6 +237,8 @@ if(CMAKE_COMPILER_IS_GNUCXX)
elseif(MSVC)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /D_CRT_SECURE_NO_WARNINGS /D_SCL_SECURE_NO_WARNINGS")
if(EIGEN_TEST_MAX_WARNING_LEVEL)
- set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /W4")
+ # C4127 - conditional expression is constant
+ # C4505 - unreferenced local function has been removed
+ set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /W4 /wd4127 /wd4505")
endif(EIGEN_TEST_MAX_WARNING_LEVEL)
endif(CMAKE_COMPILER_IS_GNUCXX)
diff --git a/test/unalignedassert.cpp b/test/unalignedassert.cpp
index 2b819417e..c3a07d195 100644
--- a/test/unalignedassert.cpp
+++ b/test/unalignedassert.cpp
@@ -87,6 +87,7 @@ void construct_at_boundary(int boundary)
_buf += (16 - (_buf % 16)); // make 16-byte aligned
_buf += boundary; // make exact boundary-aligned
T *x = ::new(reinterpret_cast<void*>(_buf)) T;
+ x[0]; // just in order to silence warnings
x->~T();
}
#endif