From 6e41ee360db3415464b60d977838d0e7ef4b7369 Mon Sep 17 00:00:00 2001 From: dehnert Date: Mon, 23 Sep 2013 15:32:54 +0200 Subject: [PATCH] Fixes to several problems with gcc. Former-commit-id: f7908fdc6fe4440647edf2838286f94b07ec76db --- CMakeLists.txt | 2 ++ src/adapters/ExplicitModelAdapter.cpp | 2 +- src/settings/ArgumentValidators.h | 1 - src/settings/Option.h | 4 ++-- 4 files changed, 5 insertions(+), 4 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index bfe7257d7..0a9dd922c 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -339,6 +339,8 @@ endif() if (ENABLE_GUROBI) message (STATUS "Linking in Gurobi.") + include_directories(${GUROBI_ROOT}/include) + link_directories(${GUROBI_ROOT}/lib) target_link_libraries(storm "gurobi55") target_link_libraries(storm-functional-tests "gurobi55") target_link_libraries(storm-performance-tests "gurobi55") diff --git a/src/adapters/ExplicitModelAdapter.cpp b/src/adapters/ExplicitModelAdapter.cpp index 5371ebfaa..63dddd452 100644 --- a/src/adapters/ExplicitModelAdapter.cpp +++ b/src/adapters/ExplicitModelAdapter.cpp @@ -439,7 +439,7 @@ namespace storm { std::vector::const_iterator> iteratorList(activeCommandList.size()); // Initialize the list of iterators. - for (int i = 0; i < activeCommandList.size(); ++i) { + for (size_t i = 0; i < activeCommandList.size(); ++i) { iteratorList[i] = activeCommandList[i].cbegin(); } diff --git a/src/settings/ArgumentValidators.h b/src/settings/ArgumentValidators.h index 4d0ce8170..32084a90c 100644 --- a/src/settings/ArgumentValidators.h +++ b/src/settings/ArgumentValidators.h @@ -57,7 +57,6 @@ namespace storm { static std::function stringInListValidator(std::vector list) { return [list] (std::string const inputString, std::string& errorMessageTarget) -> bool { - bool containsElement = false; std::string const lowerInputString = storm::utility::StringHelper::stringToLower(inputString); for (auto it = list.cbegin(); it != list.cend(); ++it) { if (storm::utility::StringHelper::stringToLower(*it).compare(lowerInputString) == 0) { diff --git a/src/settings/Option.h b/src/settings/Option.h index 1fabf984a..fd980c923 100644 --- a/src/settings/Option.h +++ b/src/settings/Option.h @@ -61,7 +61,7 @@ namespace storm { Option(Option const& other): longName(other.longName), shortName(other.shortName), description(other.description), moduleName(other.moduleName), isRequired(other.isRequired), hasBeenSet(other.hasBeenSet) { // Copy all Arguments this->arguments.reserve(other.arguments.size()); - for (auto i = 0; i < other.arguments.size(); ++i) { + for (size_t i = 0; i < other.arguments.size(); ++i) { // Clone gives a deep copy this->arguments.push_back(std::shared_ptr(other.arguments.at(i).get()->clone())); } @@ -96,7 +96,7 @@ namespace storm { LOG4CPLUS_ERROR(logger, "Option::unify: Could not unify Option \"" << getLongName() << "\" because the Argument Counts are different!"); throw storm::exceptions::OptionUnificationException() << "Could not unify Option \"" << getLongName() << "\" because the Argument Counts are different!"; } - for(auto i = 0; i != this->arguments.size(); i++) { + for(size_t i = 0; i != this->arguments.size(); i++) { ArgumentBase* A = this->arguments.at(i).get(); ArgumentBase* B = other.arguments.at(i).get();