From 4cc937794117a27c7a1d2643fdadd242dc83359a Mon Sep 17 00:00:00 2001 From: Gael Guennebaud Date: Mon, 24 Jun 2013 17:24:32 +0200 Subject: [PATCH] fix casting from double* to void* in SuperLU and Cholmod support --- Eigen/src/CholmodSupport/CholmodSupport.h | 7 ++++--- Eigen/src/SuperLUSupport/SuperLUSupport.h | 4 ++-- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/Eigen/src/CholmodSupport/CholmodSupport.h b/Eigen/src/CholmodSupport/CholmodSupport.h index d4008e63d..783324b0b 100644 --- a/Eigen/src/CholmodSupport/CholmodSupport.h +++ b/Eigen/src/CholmodSupport/CholmodSupport.h @@ -126,7 +126,7 @@ cholmod_dense viewAsCholmod(MatrixBase& mat) res.ncol = mat.cols(); res.nzmax = res.nrow * res.ncol; res.d = Derived::IsVectorAtCompileTime ? mat.derived().size() : mat.derived().outerStride(); - res.x = mat.derived().data(); + res.x = (void*)(mat.derived().data()); res.z = 0; internal::cholmod_configure_matrix(res); @@ -295,7 +295,8 @@ class CholmodBase : internal::noncopyable eigen_assert(size==b.rows()); // note: cd stands for Cholmod Dense - cholmod_dense b_cd = viewAsCholmod(b.const_cast_derived()); + Rhs& b_ref(b.const_cast_derived()); + cholmod_dense b_cd = viewAsCholmod(b_ref); cholmod_dense* x_cd = cholmod_solve(CHOLMOD_A, m_cholmodFactor, &b_cd, &m_cholmod); if(!x_cd) { @@ -345,7 +346,7 @@ class CholmodBase : internal::noncopyable } template - void dumpMemory(Stream& s) + void dumpMemory(Stream& /*s*/) {} protected: diff --git a/Eigen/src/SuperLUSupport/SuperLUSupport.h b/Eigen/src/SuperLUSupport/SuperLUSupport.h index 3034c7af5..bcb355760 100644 --- a/Eigen/src/SuperLUSupport/SuperLUSupport.h +++ b/Eigen/src/SuperLUSupport/SuperLUSupport.h @@ -160,7 +160,7 @@ struct SluMatrix : SuperMatrix res.ncol = mat.cols(); res.storage.lda = MatrixType::IsVectorAtCompileTime ? mat.size() : mat.outerStride(); - res.storage.values = mat.data(); + res.storage.values = (void*)(mat.data()); return res; } @@ -377,7 +377,7 @@ class SuperLUBase : internal::noncopyable } template - void dumpMemory(Stream& s) + void dumpMemory(Stream& /*s*/) {} protected: