From e179bb5850f83ebdb4707ce82aef30710f0d199d Mon Sep 17 00:00:00 2001 From: Arne Morten Kvarving Date: Tue, 9 Mar 2021 08:39:17 +0100 Subject: [PATCH] quell uninitialized usage warning without mpi --- opm/simulators/utils/ParallelRestart.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/opm/simulators/utils/ParallelRestart.cpp b/opm/simulators/utils/ParallelRestart.cpp index 6bef3d885..888619576 100644 --- a/opm/simulators/utils/ParallelRestart.cpp +++ b/opm/simulators/utils/ParallelRestart.cpp @@ -887,12 +887,14 @@ void unpack(RestartValue& data, std::vector& buffer, int& position, unpack(data.extra, buffer, position, comm); } -void unpack(Opm::time_point& data, std::vector& buffer, int& position, +void unpack([[maybe_unused]] Opm::time_point& data, std::vector& 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 }