Remove warnings about unused parameters (-Wunused-parameter)

kalman-mex
Sébastien Villemot 2023-09-20 16:30:02 +02:00
parent 6dd55726e6
commit e0bc9f29a1
No known key found for this signature in database
GPG Key ID: 2CECE9350ECEBE4A
10 changed files with 24 additions and 23 deletions

View File

@ -174,7 +174,7 @@ Approximation::walkStochSteady()
we save the steady state to ss. The new steady is also put to we save the steady state to ss. The new steady is also put to
model.getSteady(). */ model.getSteady(). */
DRFixPoint<Storage::fold> fp(*rule_ders, ypart, model.getSteady(), dsigma); DRFixPoint<Storage::fold> fp(*rule_ders, ypart, model.getSteady(), dsigma);
bool converged = fp.calcFixPoint(DecisionRule::emethod::horner, model.getSteady()); bool converged = fp.calcFixPoint(model.getSteady());
JournalRecord rec(journal); JournalRecord rec(journal);
rec << "Fix point calcs: iter=" << fp.getNumIter() << ", newton_iter=" rec << "Fix point calcs: iter=" << fp.getNumIter() << ", newton_iter="
<< fp.getNewtonTotalIter() << ", last_newton_iter=" << fp.getNewtonLastIter() << "."; << fp.getNewtonTotalIter() << ", last_newton_iter=" << fp.getNewtonLastIter() << ".";
@ -233,7 +233,7 @@ Approximation::walkStochSteady()
{ {
// centralize decision rule for zero steps // centralize decision rule for zero steps
DRFixPoint<Storage::fold> fp(*rule_ders, ypart, model.getSteady(), 1.0); DRFixPoint<Storage::fold> fp(*rule_ders, ypart, model.getSteady(), 1.0);
bool converged = fp.calcFixPoint(DecisionRule::emethod::horner, model.getSteady()); bool converged = fp.calcFixPoint(model.getSteady());
JournalRecord rec(journal); JournalRecord rec(journal);
rec << "Fix point calcs: iter=" << fp.getNumIter() << ", newton_iter=" rec << "Fix point calcs: iter=" << fp.getNumIter() << ", newton_iter="
<< fp.getNewtonTotalIter() << ", last_newton_iter=" << fp.getNewtonLastIter() << "."; << fp.getNewtonTotalIter() << ", last_newton_iter=" << fp.getNewtonLastIter() << ".";

View File

@ -523,7 +523,7 @@ public:
DRFixPoint(const _Tg &g, const PartitionY &yp, DRFixPoint(const _Tg &g, const PartitionY &yp,
const Vector &ys, double sigma); const Vector &ys, double sigma);
bool calcFixPoint(emethod em, Vector &out); bool calcFixPoint(Vector &out);
int int
getNumIter() const getNumIter() const
@ -685,7 +685,7 @@ DRFixPoint<t>::solveNewton(Vector &y)
template<Storage t> template<Storage t>
bool bool
DRFixPoint<t>::calcFixPoint(emethod em, Vector &out) DRFixPoint<t>::calcFixPoint(Vector &out)
{ {
KORD_RAISE_IF(out.length() != ypart.ny(), KORD_RAISE_IF(out.length() != ypart.ny(),
"Wrong length of out in DRFixPoint::calcFixPoint"); "Wrong length of out in DRFixPoint::calcFixPoint");

View File

@ -1,6 +1,6 @@
/* /*
* Copyright © 2004-2011 Ondra Kamenik * Copyright © 2004-2011 Ondra Kamenik
* Copyright © 2019-2022 Dynare Team * Copyright © 2019-2023 Dynare Team
* *
* This file is part of Dynare. * This file is part of Dynare.
* *
@ -113,21 +113,22 @@ GeneralMatrix::multAndAdd(const ConstGeneralMatrix &a, const ConstGeneralMatrix
void void
GeneralMatrix::multAndAdd(const ConstGeneralMatrix &a, const ConstGeneralMatrix &b, GeneralMatrix::multAndAdd(const ConstGeneralMatrix &a, const ConstGeneralMatrix &b,
const std::string &dum, double mult) [[maybe_unused]] const std::string &dum, double mult)
{ {
gemm("N", a, "T", b, mult, 1.0); gemm("N", a, "T", b, mult, 1.0);
} }
void void
GeneralMatrix::multAndAdd(const ConstGeneralMatrix &a, const std::string &dum, GeneralMatrix::multAndAdd(const ConstGeneralMatrix &a, [[maybe_unused]] const std::string &dum,
const ConstGeneralMatrix &b, double mult) const ConstGeneralMatrix &b, double mult)
{ {
gemm("T", a, "N", b, mult, 1.0); gemm("T", a, "N", b, mult, 1.0);
} }
void void
GeneralMatrix::multAndAdd(const ConstGeneralMatrix &a, const std::string &dum1, GeneralMatrix::multAndAdd(const ConstGeneralMatrix &a, [[maybe_unused]] const std::string &dum1,
const ConstGeneralMatrix &b, const std::string &dum2, double mult) const ConstGeneralMatrix &b, [[maybe_unused]] const std::string &dum2,
double mult)
{ {
gemm("T", a, "T", b, mult, 1.0); gemm("T", a, "T", b, mult, 1.0);
} }
@ -242,7 +243,7 @@ GeneralMatrix::add(double a, const ConstGeneralMatrix &m)
} }
void void
GeneralMatrix::add(double a, const ConstGeneralMatrix &m, const std::string &dum) GeneralMatrix::add(double a, const ConstGeneralMatrix &m, [[maybe_unused]] const std::string &dum)
{ {
if (m.nrows() != cols || m.ncols() != rows) if (m.nrows() != cols || m.ncols() != rows)
throw SYLV_MES_EXCEPTION("Matrix has different size in GeneralMatrix::add."); throw SYLV_MES_EXCEPTION("Matrix has different size in GeneralMatrix::add.");

View File

@ -421,7 +421,7 @@ QuasiTriangular::QuasiTriangular(const ConstVector &d, int d_size)
{ {
} }
QuasiTriangular::QuasiTriangular(const std::string &dummy, const QuasiTriangular &t) QuasiTriangular::QuasiTriangular([[maybe_unused]] const std::string &dummy, const QuasiTriangular &t)
: SqSylvMatrix(t.nrows()), diagonal(getData().base(), t.diagonal) : SqSylvMatrix(t.nrows()), diagonal(getData().base(), t.diagonal)
{ {
Vector aux(t.getData()); Vector aux(t.getData());

View File

@ -1,6 +1,6 @@
/* /*
* Copyright © 2004-2011 Ondra Kamenik * Copyright © 2004-2011 Ondra Kamenik
* Copyright © 2019 Dynare Team * Copyright © 2019-2023 Dynare Team
* *
* This file is part of Dynare. * This file is part of Dynare.
* *
@ -157,13 +157,13 @@ QuasiTriangularZero::print() const
} }
void void
QuasiTriangularZero::multKron(KronVector &x) const QuasiTriangularZero::multKron([[maybe_unused]] KronVector &x) const
{ {
throw SYLV_MES_EXCEPTION("Attempt to run QuasiTriangularZero::multKron."); throw SYLV_MES_EXCEPTION("Attempt to run QuasiTriangularZero::multKron.");
} }
void void
QuasiTriangularZero::multKronTrans(KronVector &x) const QuasiTriangularZero::multKronTrans([[maybe_unused]] KronVector &x) const
{ {
throw SYLV_MES_EXCEPTION("Attempt to run QuasiTriangularZero::multKronTrans."); throw SYLV_MES_EXCEPTION("Attempt to run QuasiTriangularZero::multKronTrans.");
} }

View File

@ -130,7 +130,7 @@ Equivalence::Equivalence(int num)
} }
} }
Equivalence::Equivalence(int num, const std::string &dummy) Equivalence::Equivalence(int num, [[maybe_unused]] const std::string &dummy)
: n(num) : n(num)
{ {
OrdSequence s; OrdSequence s;

View File

@ -327,7 +327,7 @@ FPSTensor::increment(IntSequence &v) const
} }
void void
FPSTensor::decrement(IntSequence &v) const FPSTensor::decrement([[maybe_unused]] IntSequence &v) const
{ {
TL_RAISE("FPSTensor::decrement not implemented"); TL_RAISE("FPSTensor::decrement not implemented");
} }

View File

@ -1,6 +1,6 @@
/* /*
* Copyright © 2004 Ondra Kamenik * Copyright © 2004 Ondra Kamenik
* Copyright © 2019 Dynare Team * Copyright © 2019-2023 Dynare Team
* *
* This file is part of Dynare. * This file is part of Dynare.
* *
@ -141,12 +141,12 @@ public:
header.increment(v); header.increment(v);
} }
void void
decrement(IntSequence &v) const override decrement([[maybe_unused]] IntSequence &v) const override
{ {
TL_RAISE("Not implemented error in IrregTensor::decrement"); TL_RAISE("Not implemented error in IrregTensor::decrement");
} }
int int
getOffset(const IntSequence &v) const override getOffset([[maybe_unused]] const IntSequence &v) const override
{ {
TL_RAISE("Not implemented error in IrregTensor::getOffset"); TL_RAISE("Not implemented error in IrregTensor::getOffset");
} }

View File

@ -1,5 +1,5 @@
/* /*
* Copyright © 2010-2020 Dynare Team * Copyright © 2010-2023 Dynare Team
* *
* This file is part of Dynare. * This file is part of Dynare.
* *
@ -27,7 +27,7 @@
int main(int nargs, char **args); int main(int nargs, char **args);
void void
mexFunction(int nlhs, mxArray *plhs[], mexFunction(int nlhs, [[maybe_unused]] mxArray *plhs[],
int nrhs, const mxArray *prhs[]) int nrhs, const mxArray *prhs[])
{ {
int nargs = 0; int nargs = 0;

View File

@ -1,5 +1,5 @@
/* /*
* Copyright © 2010-2013 Dynare Team * Copyright © 2010-2023 Dynare Team
* *
* This file is part of Dynare. * This file is part of Dynare.
* *
@ -29,7 +29,7 @@ extern "C"
int constant_seed; int constant_seed;
void void
msExit(int status) msExit([[maybe_unused]] int status)
{ {
throw "Error in MS-SBVAR MEX file.\n"; throw "Error in MS-SBVAR MEX file.\n";
} }