From: Augustin Degomme Date: Tue, 6 Nov 2018 17:06:05 +0000 (+0100) Subject: fix gcc 9 warnings. Have to check if the std::move removal is harmful X-Git-Tag: v3_22~816 X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/commitdiff_plain/4f2e9b5f5dd58b3493e5ce66014e52c76f68a777 fix gcc 9 warnings. Have to check if the std::move removal is harmful --- diff --git a/include/simgrid/Exception.hpp b/include/simgrid/Exception.hpp index b7d232fa2d..a259e2be01 100644 --- a/include/simgrid/Exception.hpp +++ b/include/simgrid/Exception.hpp @@ -92,6 +92,8 @@ public: * @param message Exception message */ xbt_ex(simgrid::xbt::ThrowPoint throwpoint, std::string message) : simgrid::Exception(throwpoint, message) {} + + xbt_ex(const xbt_ex&) = default; ~xbt_ex(); // DO NOT define it here -- see ex.cpp for a rationale diff --git a/include/simgrid/kernel/future.hpp b/include/simgrid/kernel/future.hpp index 766293985a..693203aa79 100644 --- a/include/simgrid/kernel/future.hpp +++ b/include/simgrid/kernel/future.hpp @@ -359,7 +359,7 @@ public: simgrid::xbt::fulfill_promise(promise, [&] { return continuation(std::move(future)); }); }, std::move(promise), state, std::move(continuation))); - return std::move(future); + return future; } template diff --git a/include/xbt/future.hpp b/include/xbt/future.hpp index be488ed9d7..521b02ba94 100644 --- a/include/xbt/future.hpp +++ b/include/xbt/future.hpp @@ -134,7 +134,7 @@ public: T value = std::move(value_); value_.~T(); status_ = ResultStatus::invalid; - return std::move(value); + return value; } case ResultStatus::exception: { std::exception_ptr exception = std::move(exception_); diff --git a/src/mc/mc_unw.hpp b/src/mc/mc_unw.hpp index f776a95cca..f3c2e8d8c8 100644 --- a/src/mc/mc_unw.hpp +++ b/src/mc/mc_unw.hpp @@ -50,6 +50,7 @@ class UnwindContext { public: UnwindContext() = default; + UnwindContext(const UnwindContext&) = default; ~UnwindContext() { clear(); } void initialize(simgrid::mc::RemoteClient* process, unw_context_t* c); void clear();