From a9aa3bcf50d55b63c8adb493a06c903ec34251c6 Mon Sep 17 00:00:00 2001 From: Angelos Mantzaflaris Date: Thu, 1 Dec 2016 21:23:43 +0100 Subject: [PATCH 1/2] fix two warnings(unused typedef, unused variable) and a typo --- Eigen/src/Core/Dot.h | 4 +++- Eigen/src/Core/PlainObjectBase.h | 1 + Eigen/src/Core/util/Memory.h | 2 +- 3 files changed, 5 insertions(+), 2 deletions(-) diff --git a/Eigen/src/Core/Dot.h b/Eigen/src/Core/Dot.h index 1d7f2262e..f4fb4db7e 100644 --- a/Eigen/src/Core/Dot.h +++ b/Eigen/src/Core/Dot.h @@ -70,9 +70,11 @@ MatrixBase::dot(const MatrixBase& other) const EIGEN_STATIC_ASSERT_VECTOR_ONLY(Derived) EIGEN_STATIC_ASSERT_VECTOR_ONLY(OtherDerived) EIGEN_STATIC_ASSERT_SAME_VECTOR_SIZE(Derived,OtherDerived) +#if !(defined(EIGEN_NO_STATIC_ASSERT) && defined(EIGEN_NO_DEBUG)) typedef internal::scalar_conj_product_op func; EIGEN_CHECK_BINARY_COMPATIBILIY(func,Scalar,typename OtherDerived::Scalar); - +#endif + eigen_assert(size() == other.size()); return internal::dot_nocheck::run(*this, other); diff --git a/Eigen/src/Core/PlainObjectBase.h b/Eigen/src/Core/PlainObjectBase.h index 2dcd929e6..0c04f8250 100644 --- a/Eigen/src/Core/PlainObjectBase.h +++ b/Eigen/src/Core/PlainObjectBase.h @@ -763,6 +763,7 @@ class PlainObjectBase : public internal::dense_xpr_base::type { // NOTE MSVC 2008 complains if we directly put bool(NumTraits::IsInteger) as the EIGEN_STATIC_ASSERT argument. const bool is_integer = NumTraits::IsInteger; + EIGEN_UNUSED_VARIABLE(is_integer); EIGEN_STATIC_ASSERT(is_integer, FLOATING_POINT_ARGUMENT_PASSED__INTEGER_WAS_EXPECTED) resize(size); diff --git a/Eigen/src/Core/util/Memory.h b/Eigen/src/Core/util/Memory.h index 0439655ca..741f35a0d 100644 --- a/Eigen/src/Core/util/Memory.h +++ b/Eigen/src/Core/util/Memory.h @@ -523,7 +523,7 @@ template struct smart_memmove_helper { template struct smart_memmove_helper { static inline void run(const T* start, const T* end, T* target) { - if (uintptr_t(target) < uintptr_t(start)) + if (IntPtr(target) < IntPtr(start)) { std::copy(start, end, target); } From b6f04a2dd4d68fe1858524709813a5df5b9a085b Mon Sep 17 00:00:00 2001 From: Angelos Mantzaflaris Date: Thu, 1 Dec 2016 21:25:58 +0100 Subject: [PATCH 2/2] typo UIntPtr --- Eigen/src/Core/util/Memory.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Eigen/src/Core/util/Memory.h b/Eigen/src/Core/util/Memory.h index 741f35a0d..67053db62 100644 --- a/Eigen/src/Core/util/Memory.h +++ b/Eigen/src/Core/util/Memory.h @@ -523,7 +523,7 @@ template struct smart_memmove_helper { template struct smart_memmove_helper { static inline void run(const T* start, const T* end, T* target) { - if (IntPtr(target) < IntPtr(start)) + if (UIntPtr(target) < UIntPtr(start)) { std::copy(start, end, target); }