From 6720b38fbf60d750393af7d63777b06438ba5d81 Mon Sep 17 00:00:00 2001 From: Benoit Steiner Date: Sun, 31 Jan 2016 16:48:50 -0800 Subject: Fixed a few compilation warnings --- unsupported/Eigen/CXX11/src/Tensor/TensorStorage.h | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'unsupported/Eigen/CXX11/src/Tensor/TensorStorage.h') diff --git a/unsupported/Eigen/CXX11/src/Tensor/TensorStorage.h b/unsupported/Eigen/CXX11/src/Tensor/TensorStorage.h index 18a916e46..ed933b6ac 100644 --- a/unsupported/Eigen/CXX11/src/Tensor/TensorStorage.h +++ b/unsupported/Eigen/CXX11/src/Tensor/TensorStorage.h @@ -41,7 +41,10 @@ class TensorStorage private: static const std::size_t Size = FixedDimensions::total_size; - EIGEN_ALIGN_MAX T m_data[Size]; + // Allocate an array of size at least one to prevent compiler warnings. + static const std::size_t MinSize = max_n_1::size; + EIGEN_ALIGN_MAX T m_data[MinSize]; + FixedDimensions m_dimensions; public: -- cgit v1.2.3