From 70866c7b7066194c9ab92c5ad9f40c9a011ecfd0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Villemot?= Date: Wed, 20 Sep 2023 16:48:29 +0200 Subject: [PATCH] Remove warnings about comparison of integer expressions of different signedness (-Wsign-compare) --- mex/sources/k_order_welfare/objective_m.cc | 2 +- mex/sources/libkorder/dynamic_m.cc | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) 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;