Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
fix gcc 9 warnings. Have to check if the std::move removal is harmful
authorAugustin Degomme <degomme@wasabi>
Tue, 6 Nov 2018 17:06:05 +0000 (18:06 +0100)
committerAugustin Degomme <degomme@wasabi>
Tue, 6 Nov 2018 17:06:05 +0000 (18:06 +0100)
include/simgrid/Exception.hpp
include/simgrid/kernel/future.hpp
include/xbt/future.hpp
src/mc/mc_unw.hpp

index b7d232fa2d631b60acf02985e9b960f8f69bdb17..a259e2be01a7faad89869759738678f04adee9d4 100644 (file)
@@ -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
 
index 766293985a9dd261c5634a68f9720f4e43c9810f..693203aa79e2c3b405077715cd8b292a4e368b53 100644 (file)
@@ -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 <class F>
index be488ed9d72f6249ca1e399fe807104876dbca73..521b02ba945f1dc35cf0d1b658e537e4f7abbd13 100644 (file)
@@ -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_);
index f776a95cca910df0143152965e08056df4fad60d..f3c2e8d8c8732e2f9f6ee2cbbc0c5ede21735a36 100644 (file)
@@ -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();