static cast to force Eigen::Index to long conversion. Change-Id: I11945c455eb3fef9bfb952f5a30d657542fbccae
diff --git a/internal/ceres/gradient_checking_cost_function.cc b/internal/ceres/gradient_checking_cost_function.cc index 7fb3ed7..3edf95d 100644 --- a/internal/ceres/gradient_checking_cost_function.cc +++ b/internal/ceres/gradient_checking_cost_function.cc
@@ -154,8 +154,8 @@ "Jacobian for " "block %d: (%ld by %ld)) " "==========\n", k, - term_jacobians[k].rows(), - term_jacobians[k].cols()); + static_cast<long>(term_jacobians[k].rows()), + static_cast<long>(term_jacobians[k].cols())); // The funny spacing creates appropriately aligned column headers. m += " block row col user dx/dy num diff dx/dy " "abs error relative error parameter residual\n";