From cd7517465000308a3eaf6c1fa134fd5138709441 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Atgeirr=20Fl=C3=B8=20Rasmussen?= Date: Fri, 23 Sep 2016 15:14:36 +0200 Subject: [PATCH 1/2] Forward declare structs as same to avoid warning. --- opm/core/simulator/WellState.hpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/opm/core/simulator/WellState.hpp b/opm/core/simulator/WellState.hpp index baacaa17..a909371e 100644 --- a/opm/core/simulator/WellState.hpp +++ b/opm/core/simulator/WellState.hpp @@ -34,7 +34,7 @@ namespace Opm { - class PhaseUsage; + struct PhaseUsage; /// The state of a set of wells. class WellState From 74e992576962bf5ee43bda1698ebb9c408187c3d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Atgeirr=20Fl=C3=B8=20Rasmussen?= Date: Fri, 23 Sep 2016 15:15:17 +0200 Subject: [PATCH 2/2] Avoid shadowing warning by using explicit scope. --- opm/core/props/satfunc/RelpermDiagnostics.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/opm/core/props/satfunc/RelpermDiagnostics.cpp b/opm/core/props/satfunc/RelpermDiagnostics.cpp index 8567d19d..ce4839e5 100644 --- a/opm/core/props/satfunc/RelpermDiagnostics.cpp +++ b/opm/core/props/satfunc/RelpermDiagnostics.cpp @@ -109,8 +109,10 @@ namespace Opm{ std::shared_ptr< const Deck > deck) { const int numSatRegions = deck->getKeyword("TABDIMS").getRecord(0).getItem("NTSFUN").get< int >(0); - const std::string msg = "Number of saturation regions: " + std::to_string(numSatRegions) + "\n"; - OpmLog::info(msg); + { + const std::string msg = "Number of saturation regions: " + std::to_string(numSatRegions) + "\n"; + OpmLog::info(msg); + } const auto& tableManager = eclState->getTableManager(); const TableContainer& swofTables = tableManager.getSwofTables(); const TableContainer& slgofTables = tableManager.getSlgofTables();