Removed more warnings.

This commit is contained in:
Hauke Heibel 2009-12-12 14:49:43 +01:00
parent d088ee35f6
commit 3dce51bd8e
7 changed files with 21 additions and 3 deletions

View File

@ -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> >

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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)

View File

@ -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)

View File

@ -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