diff --git a/opm/core/WellsGroup.cpp b/opm/core/WellsGroup.cpp index 006b7610f..3559d927f 100644 --- a/opm/core/WellsGroup.cpp +++ b/opm/core/WellsGroup.cpp @@ -558,7 +558,8 @@ namespace Opm const std::vector& well_surfacerates_phase) { if (injSpec().control_mode_ == InjectionSpecification::REIN) { - BlackoilPhases::PhaseIndex phase; + // Defaulting to water to satisfy -Wmaybe-uninitialized + BlackoilPhases::PhaseIndex phase = BlackoilPhases::Aqua; switch (injSpec().injector_type_) { case InjectionSpecification::WATER: phase = BlackoilPhases::Aqua;