Remove warnings about comparison of integer expressions of different signedness (-Wsign-compare)

kalman-mex
Sébastien Villemot 2023-09-20 16:48:29 +02:00
parent f23dd8c981
commit 70866c7b70
No known key found for this signature in database
GPG Key ID: 2CECE9350ECEBE4A
2 changed files with 2 additions and 2 deletions

View File

@ -42,7 +42,7 @@ ObjectiveMFile::unpackSparseMatrixAndCopyIntoTwoDMatData(mxArray *sparseMat, Two
/* Under MATLAB, the following check always holds at equality; under Octave, /* Under MATLAB, the following check always holds at equality; under Octave,
there may be an inequality, because Octave diminishes nzmax if one gives there may be an inequality, because Octave diminishes nzmax if one gives
zeros in the values vector when calling sparse(). */ zeros in the values vector when calling sparse(). */
assert(tdm.nrows() >= mxGetNzmax(sparseMat)); assert(tdm.nrows() >= static_cast<int>(mxGetNzmax(sparseMat)));
double *ptr = mxGetPr(sparseMat); double *ptr = mxGetPr(sparseMat);

View File

@ -72,7 +72,7 @@ DynamicModelMFile::unpackSparseMatrixAndCopyIntoTwoDMatData(mxArray *sparseMat,
/* Under MATLAB, the following check always holds at equality; under Octave, /* Under MATLAB, the following check always holds at equality; under Octave,
there may be an inequality, because Octave diminishes nzmax if one gives there may be an inequality, because Octave diminishes nzmax if one gives
zeros in the values vector when calling sparse(). */ zeros in the values vector when calling sparse(). */
assert(tdm.nrows() >= mxGetNzmax(sparseMat)); assert(tdm.nrows() >= static_cast<int>(mxGetNzmax(sparseMat)));
int rind = 0; int rind = 0;
int output_row = 0; int output_row = 0;