From f1c12d8ff0920c4b7487092314670db6969a9bcf Mon Sep 17 00:00:00 2001 From: Gael Guennebaud Date: Sun, 7 Oct 2018 21:55:59 +0200 Subject: [PATCH] Workaround gcc's alloc-size-larger-than= warning (grafted from bcb7c66b53aad713d3edd98b24d094b5542b18bf ) --- Eigen/src/Core/DenseStorage.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Eigen/src/Core/DenseStorage.h b/Eigen/src/Core/DenseStorage.h index 7958feeb9..7d6d4e66d 100644 --- a/Eigen/src/Core/DenseStorage.h +++ b/Eigen/src/Core/DenseStorage.h @@ -404,7 +404,7 @@ template class DenseStorage(m_data, m_rows*m_cols); - if (size) + if (size>0) // >0 and not simply !=0 to let the compiler knows that size cannot be negative m_data = internal::conditional_aligned_new_auto(size); else m_data = 0; @@ -479,7 +479,7 @@ template class DenseStorage(m_data, _Rows*m_cols); - if (size) + if (size>0) // >0 and not simply !=0 to let the compiler knows that size cannot be negative m_data = internal::conditional_aligned_new_auto(size); else m_data = 0; @@ -553,7 +553,7 @@ template class DenseStorage(m_data, _Cols*m_rows); - if (size) + if (size>0) // >0 and not simply !=0 to let the compiler knows that size cannot be negative m_data = internal::conditional_aligned_new_auto(size); else m_data = 0;