From 7c4f9ecf0cbdd1eae82f1808bffb5895be3c42ac Mon Sep 17 00:00:00 2001 From: Gael Guennebaud Date: Sat, 21 Feb 2009 16:23:18 +0000 Subject: fix posix_memalign return value warning --- Eigen/src/Core/util/Memory.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'Eigen/src/Core/util/Memory.h') diff --git a/Eigen/src/Core/util/Memory.h b/Eigen/src/Core/util/Memory.h index 5ceeb0dbb..637b45e7a 100644 --- a/Eigen/src/Core/util/Memory.h +++ b/Eigen/src/Core/util/Memory.h @@ -78,7 +78,8 @@ inline void* ei_aligned_malloc(size_t size) #ifdef EIGEN_EXCEPTIONS const int failed = #endif - posix_memalign(&result, 16, size); + if(posix_memalign(&result, 16, size)) + result = 0; #else #if !EIGEN_ARCH_WANTS_ALIGNMENT result = malloc(size); -- cgit v1.2.3