From 05203792f26d60d0222b2bf914acaa8c44fd7ffd Mon Sep 17 00:00:00 2001 From: dehnert Date: Wed, 21 Dec 2016 16:03:27 +0100 Subject: [PATCH] fixed a couple of warnings --- resources/3rdparty/cpptemplate/cpptempl.h | 4 ++-- src/storm/generator/JaniNextStateGenerator.cpp | 2 +- src/storm/settings/ArgumentTypeInferationHelper.cpp | 10 +++++----- .../solver/stateelimination/StatePriorityQueue.cpp | 2 +- src/storm/storage/bisimulation/Partition.cpp | 4 ++-- src/storm/storage/dd/sylvan/InternalSylvanAdd.cpp | 1 - 6 files changed, 11 insertions(+), 12 deletions(-) diff --git a/resources/3rdparty/cpptemplate/cpptempl.h b/resources/3rdparty/cpptemplate/cpptempl.h index bd7c77510..b6a19d293 100755 --- a/resources/3rdparty/cpptemplate/cpptempl.h +++ b/resources/3rdparty/cpptemplate/cpptempl.h @@ -114,8 +114,8 @@ namespace cpptempl { public: TemplateException(std::string reason) : m_reason(reason){} - ~TemplateException() throw() {} - const char* what() throw() { + ~TemplateException() {} + const char* what() const noexcept { return m_reason.c_str(); } private: diff --git a/src/storm/generator/JaniNextStateGenerator.cpp b/src/storm/generator/JaniNextStateGenerator.cpp index a2c64c235..625e4cd8e 100644 --- a/src/storm/generator/JaniNextStateGenerator.cpp +++ b/src/storm/generator/JaniNextStateGenerator.cpp @@ -593,7 +593,7 @@ namespace storm { auto index = std::distance(enabledEdges.begin(), edgeSetIt); if (it != writtenGlobalVariables.end()) { - STORM_LOG_THROW(it->second == index, storm::exceptions::WrongFormatException, "Multiple writes to global variable '" << globalVariable.getName() << "' in synchronizing edges."); + STORM_LOG_THROW(it->second == static_cast(index), storm::exceptions::WrongFormatException, "Multiple writes to global variable '" << globalVariable.getName() << "' in synchronizing edges."); } else { writtenGlobalVariables.emplace(globalVariable, index); } diff --git a/src/storm/settings/ArgumentTypeInferationHelper.cpp b/src/storm/settings/ArgumentTypeInferationHelper.cpp index 49ea8a5e1..1f1144bcf 100644 --- a/src/storm/settings/ArgumentTypeInferationHelper.cpp +++ b/src/storm/settings/ArgumentTypeInferationHelper.cpp @@ -34,7 +34,7 @@ namespace storm { } template - std::string const& inferToString(ArgumentType const& argumentType, T const& value) { + std::string const& inferToString(ArgumentType const&, T const&) { STORM_LOG_THROW(false, storm::exceptions::InternalTypeErrorException, "Unable to infer string from non-string argument value."); } @@ -45,7 +45,7 @@ namespace storm { } template - int_fast64_t inferToInteger(ArgumentType const& argumentType, T const& value) { + int_fast64_t inferToInteger(ArgumentType const&, T const&) { STORM_LOG_THROW(false, storm::exceptions::InternalTypeErrorException, "Unable to infer integer from non-integer argument value."); } @@ -56,7 +56,7 @@ namespace storm { } template - uint_fast64_t inferToUnsignedInteger(ArgumentType const& argumentType, T const& value) { + uint_fast64_t inferToUnsignedInteger(ArgumentType const&, T const&) { STORM_LOG_THROW(false, storm::exceptions::InternalTypeErrorException, "Unable to infer unsigned integer from non-unsigned argument value."); } @@ -67,7 +67,7 @@ namespace storm { } template - double inferToDouble(ArgumentType const& argumentType, T const& value) { + double inferToDouble(ArgumentType const&, T const&) { STORM_LOG_THROW(false, storm::exceptions::InternalTypeErrorException, "Unable to infer double from non-double argument value."); } @@ -78,7 +78,7 @@ namespace storm { } template - bool inferToBoolean(ArgumentType const& argumentType, T const& value) { + bool inferToBoolean(ArgumentType const&, T const&) { STORM_LOG_THROW(false, storm::exceptions::InternalTypeErrorException, "Unable to infer boolean from non-boolean argument value."); } diff --git a/src/storm/solver/stateelimination/StatePriorityQueue.cpp b/src/storm/solver/stateelimination/StatePriorityQueue.cpp index c7779d7c7..2dee7b31a 100644 --- a/src/storm/solver/stateelimination/StatePriorityQueue.cpp +++ b/src/storm/solver/stateelimination/StatePriorityQueue.cpp @@ -4,7 +4,7 @@ namespace storm { namespace solver { namespace stateelimination { - void StatePriorityQueue::update(storm::storage::sparse::state_type state) { + void StatePriorityQueue::update(storm::storage::sparse::state_type) { // Intentionally left empty. } diff --git a/src/storm/storage/bisimulation/Partition.cpp b/src/storm/storage/bisimulation/Partition.cpp index 5b4dbc78f..a98aa4ba7 100644 --- a/src/storm/storage/bisimulation/Partition.cpp +++ b/src/storm/storage/bisimulation/Partition.cpp @@ -272,7 +272,7 @@ namespace storm { // points. template bool Partition::splitBlock(Block& block, std::function const& less) { - return this->splitBlock(block, less, [] (Block& block) {}); + return this->splitBlock(block, less, [] (Block&) {}); } template @@ -289,7 +289,7 @@ namespace storm { template bool Partition::split(std::function const& less) { - return this->split(less, [] (Block& block) {}); + return this->split(less, [] (Block&) {}); } template diff --git a/src/storm/storage/dd/sylvan/InternalSylvanAdd.cpp b/src/storm/storage/dd/sylvan/InternalSylvanAdd.cpp index 391f26be9..ff5461296 100644 --- a/src/storm/storage/dd/sylvan/InternalSylvanAdd.cpp +++ b/src/storm/storage/dd/sylvan/InternalSylvanAdd.cpp @@ -880,7 +880,6 @@ namespace storm { STORM_LOG_ASSERT(mtbdd_isleaf(node), "Expected leaf, but got variable " << mtbdd_getvar(node) << "."); bool negated = mtbdd_hascomp(node); - MTBDD n = mtbdd_regular(node); STORM_LOG_ASSERT(mtbdd_gettype(node) == sylvan_storm_rational_function_get_type(), "Expected a storm::RationalFunction value."); uint64_t value = mtbdd_getvalue(node);