diff --git a/internal/ceres/covariance_impl.cc b/internal/ceres/covariance_impl.cc
index 324b553..d80554b 100644
--- a/internal/ceres/covariance_impl.cc
+++ b/internal/ceres/covariance_impl.cc
@@ -630,7 +630,7 @@ bool CovarianceImpl::ComputeCovarianceValuesUsingSuiteSparseQR() {
   // separately.
   const SuiteSparse_long rank = SuiteSparseQR<double>(SPQR_ORDERING_BESTAMD,
                                                       SPQR_DEFAULT_TOL,
-                                                      cholmod_jacobian.ncol,
+                                                      static_cast<int64_t>(cholmod_jacobian.ncol),
                                                       &cholmod_jacobian,
                                                       &R,
                                                       &permutation,
