From 4dc234d635d2b3ee460c11c6ec4fabc1f821878a Mon Sep 17 00:00:00 2001 From: TimQu Date: Thu, 27 Sep 2018 14:24:09 +0200 Subject: [PATCH] silenced several 'unused parameter'-warnings --- .../solver/EigenLinearEquationSolver.cpp | 4 ++-- src/storm/solver/LinearEquationSolver.cpp | 2 +- src/storm/solver/StandardGameSolver.cpp | 2 +- .../CheckIfThenElseGuardVisitor.cpp | 8 ++++---- .../SubsetEnumerator.cpp | 2 +- src/storm/storage/jani/ArrayEliminator.cpp | 20 +++++++++---------- src/storm/storage/jani/FunctionEliminator.cpp | 6 +++--- .../jani/traverser/ArrayExpressionFinder.cpp | 14 ++++++------- .../storage/jani/traverser/JaniTraverser.cpp | 8 ++++---- src/storm/transformer/GoalStateMerger.cpp | 2 +- src/storm/utility/ConstantsComparator.cpp | 4 ++-- src/storm/utility/DirectEncodingExporter.cpp | 2 +- src/storm/utility/VectorHelper.cpp | 2 +- src/storm/utility/constants.cpp | 2 +- 14 files changed, 39 insertions(+), 39 deletions(-) diff --git a/src/storm/solver/EigenLinearEquationSolver.cpp b/src/storm/solver/EigenLinearEquationSolver.cpp index 55046a495..6c96715cf 100644 --- a/src/storm/solver/EigenLinearEquationSolver.cpp +++ b/src/storm/solver/EigenLinearEquationSolver.cpp @@ -244,7 +244,7 @@ namespace storm { } template - LinearEquationSolverProblemFormat EigenLinearEquationSolver::getEquationProblemFormat(Environment const& env) const { + LinearEquationSolverProblemFormat EigenLinearEquationSolver::getEquationProblemFormat(Environment const&) const { return LinearEquationSolverProblemFormat::EquationSystem; } @@ -259,7 +259,7 @@ namespace storm { } template - std::unique_ptr> EigenLinearEquationSolverFactory::create(Environment const& env) const { + std::unique_ptr> EigenLinearEquationSolverFactory::create(Environment const&) const { return std::make_unique>(); } diff --git a/src/storm/solver/LinearEquationSolver.cpp b/src/storm/solver/LinearEquationSolver.cpp index 14cda16bc..8207efcff 100644 --- a/src/storm/solver/LinearEquationSolver.cpp +++ b/src/storm/solver/LinearEquationSolver.cpp @@ -31,7 +31,7 @@ namespace storm { } template - LinearEquationSolverRequirements LinearEquationSolver::getRequirements(Environment const& env) const { + LinearEquationSolverRequirements LinearEquationSolver::getRequirements(Environment const&) const { return LinearEquationSolverRequirements(); } diff --git a/src/storm/solver/StandardGameSolver.cpp b/src/storm/solver/StandardGameSolver.cpp index f0ef60564..837a149b3 100644 --- a/src/storm/solver/StandardGameSolver.cpp +++ b/src/storm/solver/StandardGameSolver.cpp @@ -498,7 +498,7 @@ namespace storm { } template - void StandardGameSolver::getInducedMatrixVector(std::vector& x, std::vector const& b, std::vector const& player1Choices, std::vector const& player2Choices, storm::storage::SparseMatrix& inducedMatrix, std::vector& inducedVector) const { + void StandardGameSolver::getInducedMatrixVector(std::vector&, std::vector const& b, std::vector const& player1Choices, std::vector const& player2Choices, storm::storage::SparseMatrix& inducedMatrix, std::vector& inducedVector) const { // Get the rows of the player 2 matrix that are selected by the schedulers. // Note that rows can be selected more than once and in an arbitrary order. std::vector selectedRows; diff --git a/src/storm/storage/expressions/CheckIfThenElseGuardVisitor.cpp b/src/storm/storage/expressions/CheckIfThenElseGuardVisitor.cpp index 0bbb32fba..49a1e658c 100644 --- a/src/storm/storage/expressions/CheckIfThenElseGuardVisitor.cpp +++ b/src/storm/storage/expressions/CheckIfThenElseGuardVisitor.cpp @@ -43,7 +43,7 @@ namespace storm { boost::any_cast(expression.getSecondOperand()->accept(*this, data)); } - boost::any CheckIfThenElseGuardVisitor::visit(VariableExpression const& expression, boost::any const&) { + boost::any CheckIfThenElseGuardVisitor::visit(VariableExpression const&, boost::any const&) { return false; } @@ -55,15 +55,15 @@ namespace storm { return expression.getOperand()->accept(*this, data); } - boost::any CheckIfThenElseGuardVisitor::visit(BooleanLiteralExpression const& expression, boost::any const&) { + boost::any CheckIfThenElseGuardVisitor::visit(BooleanLiteralExpression const&, boost::any const&) { return false; } - boost::any CheckIfThenElseGuardVisitor::visit(IntegerLiteralExpression const& expression, boost::any const&) { + boost::any CheckIfThenElseGuardVisitor::visit(IntegerLiteralExpression const&, boost::any const&) { return false; } - boost::any CheckIfThenElseGuardVisitor::visit(RationalLiteralExpression const& expression, boost::any const&) { + boost::any CheckIfThenElseGuardVisitor::visit(RationalLiteralExpression const&, boost::any const&) { return false; } diff --git a/src/storm/storage/geometry/nativepolytopeconversion/SubsetEnumerator.cpp b/src/storm/storage/geometry/nativepolytopeconversion/SubsetEnumerator.cpp index c6103bf9d..2de1b1c45 100644 --- a/src/storm/storage/geometry/nativepolytopeconversion/SubsetEnumerator.cpp +++ b/src/storm/storage/geometry/nativepolytopeconversion/SubsetEnumerator.cpp @@ -84,7 +84,7 @@ namespace storm { } template< typename DataType> - bool SubsetEnumerator::trueFilter(std::vector const& subset, uint_fast64_t const& item, DataType const& data){ + bool SubsetEnumerator::trueFilter(std::vector const&, uint_fast64_t const&, DataType const&) { return true; } diff --git a/src/storm/storage/jani/ArrayEliminator.cpp b/src/storm/storage/jani/ArrayEliminator.cpp index 9bedb334a..244eaa0b5 100644 --- a/src/storm/storage/jani/ArrayEliminator.cpp +++ b/src/storm/storage/jani/ArrayEliminator.cpp @@ -76,24 +76,24 @@ namespace storm { return boost::any_cast(expression.getOperand()->accept(*this, data)); } - virtual boost::any visit(storm::expressions::BooleanLiteralExpression const& expression, boost::any const& data) override { + virtual boost::any visit(storm::expressions::BooleanLiteralExpression const&, boost::any const&) override { return 0; } - virtual boost::any visit(storm::expressions::IntegerLiteralExpression const& expression, boost::any const& data) override { + virtual boost::any visit(storm::expressions::IntegerLiteralExpression const&, boost::any const&) override { return 0; } - virtual boost::any visit(storm::expressions::RationalLiteralExpression const& expression, boost::any const& data) override { + virtual boost::any visit(storm::expressions::RationalLiteralExpression const&, boost::any const&) override { return 0; } - virtual boost::any visit(storm::expressions::ValueArrayExpression const& expression, boost::any const& data) override { + virtual boost::any visit(storm::expressions::ValueArrayExpression const& expression, boost::any const&) override { STORM_LOG_ASSERT(expression.size()->isIntegerLiteralExpression(), "unexpected kind of size expression of ValueArrayExpression (" << expression.size()->toExpression() << ")."); return static_cast(expression.size()->evaluateAsInt()); } - virtual boost::any visit(storm::expressions::ConstructorArrayExpression const& expression, boost::any const& data) override { + virtual boost::any visit(storm::expressions::ConstructorArrayExpression const& expression, boost::any const&) override { if (!expression.size()->containsVariables()) { return static_cast(expression.size()->evaluateAsInt()); } else { @@ -114,12 +114,12 @@ namespace storm { } } - virtual boost::any visit(storm::expressions::ArrayAccessExpression const& expression, boost::any const& data) override { + virtual boost::any visit(storm::expressions::ArrayAccessExpression const&, boost::any const&) override { STORM_LOG_WARN("Found Array access expression within an array expression. This is not expected since nested arrays are currently not supported."); return 0; } - virtual boost::any visit(storm::expressions::FunctionCallExpression const& expression, boost::any const& data) override { + virtual boost::any visit(storm::expressions::FunctionCallExpression const&, boost::any const&) override { STORM_LOG_THROW(false, storm::exceptions::UnexpectedException, "Found Function call expression within an array expression. This is not expected since functions are expected to be eliminated at this point."); return 0; } @@ -328,7 +328,7 @@ namespace storm { return ResultType(boost::any_cast(expression.at(index)->accept(*this, boost::any()))); } - virtual boost::any visit(storm::expressions::ArrayAccessExpression const& expression, boost::any const& data) override { + virtual boost::any visit(storm::expressions::ArrayAccessExpression const& expression, boost::any const&) override { if (expression.getSecondOperand()->containsVariables()) { //get the size of the array expression uint64_t size = MaxArraySizeExpressionVisitor().getMaxSize(expression.getFirstOperand()->toExpression(), arraySizes); @@ -349,7 +349,7 @@ namespace storm { } } - virtual boost::any visit(storm::expressions::FunctionCallExpression const& expression, boost::any const& data) override { + virtual boost::any visit(storm::expressions::FunctionCallExpression const&, boost::any const&) override { STORM_LOG_THROW(false, storm::exceptions::UnexpectedException, "Found Function call expression while eliminating array expressions. This is not expected since functions are expected to be eliminated at this point."); return false; } @@ -497,7 +497,7 @@ namespace storm { } } - void traverse(EdgeDestination& edgeDestination, boost::any const& data) override { + void traverse(EdgeDestination& edgeDestination, boost::any const&) override { edgeDestination.setProbability(arrayExprEliminator->eliminate(edgeDestination.getProbability())); } diff --git a/src/storm/storage/jani/FunctionEliminator.cpp b/src/storm/storage/jani/FunctionEliminator.cpp index fcdaa0b34..32a9895de 100644 --- a/src/storm/storage/jani/FunctionEliminator.cpp +++ b/src/storm/storage/jani/FunctionEliminator.cpp @@ -91,7 +91,7 @@ namespace storm { } } - virtual boost::any visit(storm::expressions::VariableExpression const& expression, boost::any const& data) override { + virtual boost::any visit(storm::expressions::VariableExpression const& expression, boost::any const&) override { return expression.getSharedPointer(); } @@ -267,7 +267,7 @@ namespace storm { } } - virtual void traverse(Model& model, boost::any const& data) override { + virtual void traverse(Model& model, boost::any const&) override { // First we need to apply functions called in function bodies FunctionEliminationExpressionVisitor globalFunctionEliminationVisitor(&model.getGlobalFunctionDefinitions()); @@ -392,7 +392,7 @@ namespace storm { } } - void traverse(storm::expressions::Expression const& expression, boost::any const& data) override { + void traverse(storm::expressions::Expression const& expression, boost::any const&) override { STORM_LOG_THROW(getOccurringFunctionCalls(expression).empty(), storm::exceptions::UnexpectedException, "Did not translate functions in expression " << expression); } }; diff --git a/src/storm/storage/jani/traverser/ArrayExpressionFinder.cpp b/src/storm/storage/jani/traverser/ArrayExpressionFinder.cpp index 8ade7df61..ffd5ec641 100644 --- a/src/storm/storage/jani/traverser/ArrayExpressionFinder.cpp +++ b/src/storm/storage/jani/traverser/ArrayExpressionFinder.cpp @@ -36,7 +36,7 @@ namespace storm { boost::any_cast(expression.getSecondOperand()->accept(*this, data)); } - virtual boost::any visit(storm::expressions::VariableExpression const& expression, boost::any const&) override { + virtual boost::any visit(storm::expressions::VariableExpression const&, boost::any const&) override { return false; } @@ -48,27 +48,27 @@ namespace storm { return expression.getOperand()->accept(*this, data); } - virtual boost::any visit(storm::expressions::BooleanLiteralExpression const& expression, boost::any const&) override { + virtual boost::any visit(storm::expressions::BooleanLiteralExpression const&, boost::any const&) override { return false; } - virtual boost::any visit(storm::expressions::IntegerLiteralExpression const& expression, boost::any const&) override { + virtual boost::any visit(storm::expressions::IntegerLiteralExpression const&, boost::any const&) override { return false; } - virtual boost::any visit(storm::expressions::RationalLiteralExpression const& expression, boost::any const&) override { + virtual boost::any visit(storm::expressions::RationalLiteralExpression const&, boost::any const&) override { return false; } - virtual boost::any visit(storm::expressions::ValueArrayExpression const& expression, boost::any const& data) override { + virtual boost::any visit(storm::expressions::ValueArrayExpression const&, boost::any const&) override { return true; } - virtual boost::any visit(storm::expressions::ConstructorArrayExpression const& expression, boost::any const& data) override { + virtual boost::any visit(storm::expressions::ConstructorArrayExpression const&, boost::any const&) override { return true; } - virtual boost::any visit(storm::expressions::ArrayAccessExpression const& expression, boost::any const& data) override { + virtual boost::any visit(storm::expressions::ArrayAccessExpression const&, boost::any const&) override { return true; } diff --git a/src/storm/storage/jani/traverser/JaniTraverser.cpp b/src/storm/storage/jani/traverser/JaniTraverser.cpp index 7682c9a88..e77377a15 100644 --- a/src/storm/storage/jani/traverser/JaniTraverser.cpp +++ b/src/storm/storage/jani/traverser/JaniTraverser.cpp @@ -26,7 +26,7 @@ namespace storm { } } - void JaniTraverser::traverse(Action const& action, boost::any const& data) { + void JaniTraverser::traverse(Action const&, boost::any const&) { // Intentionally left empty. } @@ -166,7 +166,7 @@ namespace storm { } } - void JaniTraverser::traverse(storm::expressions::Expression const& expression, boost::any const& data) { + void JaniTraverser::traverse(storm::expressions::Expression const&, boost::any const&) { // intentionally left empty. } @@ -192,7 +192,7 @@ namespace storm { } } - void ConstJaniTraverser::traverse(Action const& action, boost::any const& data) { + void ConstJaniTraverser::traverse(Action const&, boost::any const&) { // Intentionally left empty. } @@ -331,7 +331,7 @@ namespace storm { } } - void ConstJaniTraverser::traverse(storm::expressions::Expression const& expression, boost::any const& data) { + void ConstJaniTraverser::traverse(storm::expressions::Expression const&, boost::any const&) { // intentionally left empty. } diff --git a/src/storm/transformer/GoalStateMerger.cpp b/src/storm/transformer/GoalStateMerger.cpp index 7707bd3f1..4c3bf0898 100644 --- a/src/storm/transformer/GoalStateMerger.cpp +++ b/src/storm/transformer/GoalStateMerger.cpp @@ -276,7 +276,7 @@ namespace storm { } template - std::shared_ptr GoalStateMerger::buildOutputModel(storm::storage::BitVector const& maybeStates, GoalStateMerger::ReturnType const& resultData, storm::storage::SparseMatrix&& transitionMatrix, storm::models::sparse::StateLabeling&& labeling, std::unordered_map&& rewardModels) const { + std::shared_ptr GoalStateMerger::buildOutputModel(storm::storage::BitVector const&, GoalStateMerger::ReturnType const&, storm::storage::SparseMatrix&& transitionMatrix, storm::models::sparse::StateLabeling&& labeling, std::unordered_map&& rewardModels) const { return std::make_shared(std::move(transitionMatrix), std::move(labeling), std::move(rewardModels)); } diff --git a/src/storm/utility/ConstantsComparator.cpp b/src/storm/utility/ConstantsComparator.cpp index 2b7aad2d9..48ff1ee22 100644 --- a/src/storm/utility/ConstantsComparator.cpp +++ b/src/storm/utility/ConstantsComparator.cpp @@ -142,11 +142,11 @@ namespace storm { } } - bool ConstantsComparator::isConstant(storm::RationalNumber const& value) const { + bool ConstantsComparator::isConstant(storm::RationalNumber const&) const { return true; } - bool ConstantsComparator::isInfinity(storm::RationalNumber const& value) const { + bool ConstantsComparator::isInfinity(storm::RationalNumber const&) const { return false; } diff --git a/src/storm/utility/DirectEncodingExporter.cpp b/src/storm/utility/DirectEncodingExporter.cpp index ec29cbe1e..3ab53f36e 100644 --- a/src/storm/utility/DirectEncodingExporter.cpp +++ b/src/storm/utility/DirectEncodingExporter.cpp @@ -145,7 +145,7 @@ namespace storm { } template - std::vector getParameters(std::shared_ptr> sparseModel) { + std::vector getParameters(std::shared_ptr>) { return {}; } diff --git a/src/storm/utility/VectorHelper.cpp b/src/storm/utility/VectorHelper.cpp index 42d2fa970..ca40c8844 100644 --- a/src/storm/utility/VectorHelper.cpp +++ b/src/storm/utility/VectorHelper.cpp @@ -43,7 +43,7 @@ namespace storm { } template<> - void VectorHelper::reduceVector(storm::solver::OptimizationDirection dir, std::vector const& source, std::vector& target, std::vector const& rowGrouping, std::vector* choices) const { + void VectorHelper::reduceVector(storm::solver::OptimizationDirection, std::vector const&, std::vector&, std::vector const&, std::vector*) const { STORM_LOG_THROW(false, storm::exceptions::NotSupportedException, "This operation is not supported."); } diff --git a/src/storm/utility/constants.cpp b/src/storm/utility/constants.cpp index d5c48a89b..050955956 100644 --- a/src/storm/utility/constants.cpp +++ b/src/storm/utility/constants.cpp @@ -46,7 +46,7 @@ namespace storm { } template - bool isNan(ValueType const& value) { + bool isNan(ValueType const&) { return false; }