From 7b3b26c4520e75e303b572cbb56f8ae1a6096a62 Mon Sep 17 00:00:00 2001 From: Arne Morten Kvarving Date: Mon, 14 Oct 2019 08:53:12 +0200 Subject: [PATCH] remove unused initialization --- src/opm/output/eclipse/AggregateMSWData.cpp | 2 +- src/opm/parser/eclipse/EclipseState/Grid/EclipseGrid.cpp | 2 +- .../parser/eclipse/EclipseState/Schedule/MSW/WellSegments.cpp | 2 +- .../EclipseState/Schedule/Well/WellProductionProperties.cpp | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/opm/output/eclipse/AggregateMSWData.cpp b/src/opm/output/eclipse/AggregateMSWData.cpp index ea9023af3..8e54aa459 100644 --- a/src/opm/output/eclipse/AggregateMSWData.cpp +++ b/src/opm/output/eclipse/AggregateMSWData.cpp @@ -126,7 +126,7 @@ namespace { segIndCB.push_back(segIndex); int newSInd = segIndex; const auto& origBranchNo = segSet[segIndex].branchNumber(); - bool endOrigBranch = true; + bool endOrigBranch; // loop down branch to find all segments in branch and number from "toe" to "heel" while (newSInd < segSet.size()) { endOrigBranch = true; diff --git a/src/opm/parser/eclipse/EclipseState/Grid/EclipseGrid.cpp b/src/opm/parser/eclipse/EclipseState/Grid/EclipseGrid.cpp index 01d4a6b96..6a7149a11 100644 --- a/src/opm/parser/eclipse/EclipseState/Grid/EclipseGrid.cpp +++ b/src/opm/parser/eclipse/EclipseState/Grid/EclipseGrid.cpp @@ -875,7 +875,7 @@ EclipseGrid::EclipseGrid(const Deck& deck, const int * actnum) zb = zt + sumKdir(i, j, dims, dz); double xt=-999; - double xb=-999; + double xb; if (j == (dims[1]-1) ) { xt = sumIdir(i, j, 0, dims, dx); diff --git a/src/opm/parser/eclipse/EclipseState/Schedule/MSW/WellSegments.cpp b/src/opm/parser/eclipse/EclipseState/Schedule/MSW/WellSegments.cpp index d2f21beeb..b4c8e246a 100644 --- a/src/opm/parser/eclipse/EclipseState/Schedule/MSW/WellSegments.cpp +++ b/src/opm/parser/eclipse/EclipseState/Schedule/MSW/WellSegments.cpp @@ -171,7 +171,7 @@ namespace Opm { for (int i = segment1; i <= segment2; ++i) { // for the first or the only segment in the range is the one specified in the WELSEGS // from the second segment in the range, the outlet segment is the previous segment in the range - int outlet_segment = -1; + int outlet_segment; if (i == segment1) { outlet_segment = outlet_segment_readin; } else { diff --git a/src/opm/parser/eclipse/EclipseState/Schedule/Well/WellProductionProperties.cpp b/src/opm/parser/eclipse/EclipseState/Schedule/Well/WellProductionProperties.cpp index 1acbfb870..d2c39ed16 100644 --- a/src/opm/parser/eclipse/EclipseState/Schedule/Well/WellProductionProperties.cpp +++ b/src/opm/parser/eclipse/EclipseState/Schedule/Well/WellProductionProperties.cpp @@ -63,7 +63,7 @@ namespace Opm { throw std::invalid_argument(msg); } - auto cmode = ProducerCMode::CMODE_UNDEFINED; + ProducerCMode cmode; if (effectiveHistoryProductionControl(this->whistctl_cmode) ) cmode = this->whistctl_cmode;