From cf4a9056600441f15c652ab0b38651f66721ce6c Mon Sep 17 00:00:00 2001 From: Svenn Tveit Date: Mon, 18 Sep 2023 14:47:35 +0200 Subject: [PATCH] Fixed compilation warnings --- opm/material/fluidsystems/blackoilpvt/H2GasPvt.hpp | 4 ++-- tests/material/test_h2brinepvt.cpp | 3 --- 2 files changed, 2 insertions(+), 5 deletions(-) diff --git a/opm/material/fluidsystems/blackoilpvt/H2GasPvt.hpp b/opm/material/fluidsystems/blackoilpvt/H2GasPvt.hpp index a06748b86..81c17bc57 100644 --- a/opm/material/fluidsystems/blackoilpvt/H2GasPvt.hpp +++ b/opm/material/fluidsystems/blackoilpvt/H2GasPvt.hpp @@ -66,7 +66,7 @@ public: { int numRegions = salinity_.size(); setNumRegions(numRegions); - for (size_t i = 0; i < numRegions; ++i) { + for (int i = 0; i < numRegions; ++i) { gasReferenceDensity_[i] = H2::gasDensity(T_ref, P_ref, extrapolate); brineReferenceDensity_[i] = Brine::liquidDensity(T_ref, P_ref, salinity_[i], extrapolate); } @@ -139,7 +139,7 @@ public: /* NOTE: Assume ideal mixing */ // Init output - Evaluation result; + Evaluation result = 0; // We have to check that one of RV and RVW is zero since H2STORE works with either GAS/WATER or GAS/OIL system assert(rv == 0.0 || rvw == 0.0); diff --git a/tests/material/test_h2brinepvt.cpp b/tests/material/test_h2brinepvt.cpp index 17a3a4072..67ef88a51 100644 --- a/tests/material/test_h2brinepvt.cpp +++ b/tests/material/test_h2brinepvt.cpp @@ -132,7 +132,6 @@ void ensurePvtApiBrine(const BrinePvt& brinePvt) Evaluation pressure = 1e5; Evaluation saltconcentration = 0.0; Evaluation rs = 0.0; - Evaluation tmp; //// // Water PVT API @@ -166,7 +165,6 @@ void ensurePvtApiGas(const H2Pvt& h2Pvt) Evaluation Rvw = 0.0; Evaluation So = 0.5; Evaluation maxSo = 1.0; - Evaluation tmp; ///// // H2 PVT API @@ -211,7 +209,6 @@ void ensurePvtApiBrineOil(const BrinePvt& brinePvt) Evaluation Rs = 0.0; Evaluation So = 0.5; Evaluation maxSo = 1.0; - Evaluation tmp; ///// // brine PVT API