fix posix_memalign return value warning

This commit is contained in:
Gael Guennebaud 2009-02-21 16:23:18 +00:00
parent 177500f37e
commit 7c4f9ecf0c

View File

@ -78,7 +78,8 @@ inline void* ei_aligned_malloc(size_t size)
#ifdef EIGEN_EXCEPTIONS #ifdef EIGEN_EXCEPTIONS
const int failed = const int failed =
#endif #endif
posix_memalign(&result, 16, size); if(posix_memalign(&result, 16, size))
result = 0;
#else #else
#if !EIGEN_ARCH_WANTS_ALIGNMENT #if !EIGEN_ARCH_WANTS_ALIGNMENT
result = malloc(size); result = malloc(size);