Merge pull request #3106 from akva2/janitoring

quell uninitialized usage warning without mpi
This commit is contained in:
Arne Morten Kvarving 2021-03-09 10:48:53 +01:00 committed by GitHub
commit 132bad5f6a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -887,12 +887,14 @@ void unpack(RestartValue& data, std::vector<char>& buffer, int& position,
unpack(data.extra, buffer, position, comm);
}
void unpack(Opm::time_point& data, std::vector<char>& buffer, int& position,
void unpack([[maybe_unused]] Opm::time_point& data, std::vector<char>& buffer, int& position,
Dune::MPIHelper::MPICommunicator comm)
{
std::time_t tp;
unpack(tp, buffer, position, comm);
#if HAVE_MPI
data = Opm::TimeService::from_time_t(tp);
#endif
}