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 b7d232f..a259e2b 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 7662939..693203a 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 be488ed..521b02b 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 f776a95..f3c2e8d 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();