diff --git a/src/details.hpp b/src/details.hpp
index 9ab072b0c91d0873ebac8f9e8d52805e7e34509b..23b17e4e3ad7bc0246d6a1b55a95bdb0a93cb258 100644
--- a/src/details.hpp
+++ b/src/details.hpp
@@ -190,7 +190,7 @@ namespace eigenpy
       typename MapNumpy<EquivalentEigenType>::EigenMap numpyMap = MapNumpy<EquivalentEigenType>::map(pyArray);
 
       void* storage = ((bp::converter::rvalue_from_python_storage<MatType>*)
-		       (memory))->storage.bytes;
+		       ((void*)memory))->storage.bytes;
       assert( (numpyMap.rows()<INT_MAX) && (numpyMap.cols()<INT_MAX) 
 	      && "Map range larger than int ... can never happen." );
       int r=(int)numpyMap.rows(),c=(int)numpyMap.cols();