diff --git a/mex/sources/k_order_welfare/objective_m.cc b/mex/sources/k_order_welfare/objective_m.cc index 2f0896a68..758a013a3 100644 --- a/mex/sources/k_order_welfare/objective_m.cc +++ b/mex/sources/k_order_welfare/objective_m.cc @@ -42,7 +42,7 @@ ObjectiveMFile::unpackSparseMatrixAndCopyIntoTwoDMatData(mxArray *sparseMat, Two /* Under MATLAB, the following check always holds at equality; under Octave, there may be an inequality, because Octave diminishes nzmax if one gives zeros in the values vector when calling sparse(). */ - assert(tdm.nrows() >= mxGetNzmax(sparseMat)); + assert(tdm.nrows() >= static_cast(mxGetNzmax(sparseMat))); double *ptr = mxGetPr(sparseMat); diff --git a/mex/sources/libkorder/dynamic_m.cc b/mex/sources/libkorder/dynamic_m.cc index 7846e4417..85b9dd119 100644 --- a/mex/sources/libkorder/dynamic_m.cc +++ b/mex/sources/libkorder/dynamic_m.cc @@ -72,7 +72,7 @@ DynamicModelMFile::unpackSparseMatrixAndCopyIntoTwoDMatData(mxArray *sparseMat, /* Under MATLAB, the following check always holds at equality; under Octave, there may be an inequality, because Octave diminishes nzmax if one gives zeros in the values vector when calling sparse(). */ - assert(tdm.nrows() >= mxGetNzmax(sparseMat)); + assert(tdm.nrows() >= static_cast(mxGetNzmax(sparseMat))); int rind = 0; int output_row = 0;