Merge pull request #3571 from bska/fix-warnings

Fix A Couple of Compiler and Static Code Analysis Warnings
This commit is contained in:
Bård Skaflestad
2023-06-14 14:25:28 +02:00
committed by GitHub
5 changed files with 7 additions and 21 deletions

View File

@@ -414,6 +414,9 @@ public:
break;
}
}
// Should not get here...
return false;
}
};

View File

@@ -598,22 +598,6 @@ namespace Opm {
static_cast<std::size_t>(Quantity::WBP9) + 1;
std::array<double, NumQuantities> wbp_{};
std::string quantityName(const Quantity quantity) const
{
switch (quantity) {
case Quantity::WBP : return "WBP";
case Quantity::WBP4: return "WBP4";
case Quantity::WBP5: return "WBP5";
case Quantity::WBP9: return "WBP9";
}
throw std::invalid_argument {
"Unkown WBP quantity '" +
std::to_string(static_cast<int>(quantity)) +
"'"
};
}
};
struct Well {

View File

@@ -45,7 +45,7 @@ namespace Opm {
namespace Opm { namespace data {
class GroupAndNetworkValues;
class InterRegFlowMap;
class WellBlockAveragePressures;
struct WellBlockAveragePressures;
class Wells;
}} // namespace Opm::data

View File

@@ -3520,8 +3520,7 @@ namespace Evaluator {
this->st_,
{}, {}, {},
reg, this->grid_, this->sched_,
{}, {}, {},
Opm::UnitSystem(Opm::UnitSystem::UnitType::UNIT_TYPE_METRIC)
{}, {}, {}, this->es_.getUnits()
};
const auto prm = this->paramFunction_(args);

View File

@@ -228,8 +228,8 @@ struct setup
// ------------------------------------------------------------------------
setup(std::string case_name,
const std::string& path = "UDQ_ACTIONX_TEST1_U.DATA")
explicit setup(std::string case_name,
const std::string& path = "UDQ_ACTIONX_TEST1_U.DATA")
: deck { Parser{}.parseFile(path) }
, es { deck }
, grid { es.getInputGrid() }