Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Add comments to acknowledge empty functions (and please Sonar).
authorArnaud Giersch <arnaud.giersch@univ-fcomte.fr>
Mon, 16 Oct 2017 08:50:48 +0000 (10:50 +0200)
committerArnaud Giersch <arnaud.giersch@univ-fcomte.fr>
Mon, 16 Oct 2017 12:00:03 +0000 (14:00 +0200)
include/simgrid/simix/blocking_simcall.hpp
include/xbt/functional.hpp
include/xbt/future.hpp
include/xbt/string.hpp
src/mc/mc_smx.cpp
src/mc/remote/RemotePtr.hpp
src/xbt/mmalloc/mm_legacy.c

index 88e522c..682b2ee 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2016. The SimGrid Team.
+/* Copyright (c) 2016-2017. The SimGrid Team.
  * All rights reserved.                                                     */
 
 /* This program is free software; you can redistribute it and/or modify it
@@ -81,7 +81,7 @@ auto kernelSync(F code) -> decltype(code().get())
 template <class T>
 class Future {
 public:
-  Future() {}
+  Future() { /* Nothing to do*/}
   Future(simgrid::kernel::Future<T> future) : future_(std::move(future)) {}
 
   bool valid() const { return future_.valid(); }
index a05a254..6f093af 100644 (file)
@@ -130,8 +130,8 @@ private:
     std::pair<void(whatever::*)(), whatever*> memberptr;
     char any1[sizeof(std::pair<void(*)(),void*>)];
     char any2[sizeof(std::pair<void(whatever::*)(), whatever*>)];
-    TaskUnion() {}
-    ~TaskUnion() {}
+    TaskUnion() { /* Nothing to do */}
+    ~TaskUnion() { /* Nothing to do */}
   };
 #endif
 
@@ -170,9 +170,8 @@ private:
   }
 
 public:
-
-  Task() {}
-  Task(std::nullptr_t) {}
+  Task() { /* Nothing to do */}
+  Task(std::nullptr_t) { /* Nothing to do */}
   ~Task()
   {
     this->clear();
index 95b3557..68040f5 100644 (file)
@@ -33,7 +33,7 @@ class Result {
     exception,
   };
 public:
-  Result() {}
+  Result() { /* Nothing to do */}
   ~Result() { this->reset(); }
 
   // Copy (if T is copyable) and move:
index c0126b4..7d665ff 100644 (file)
@@ -136,7 +136,7 @@ public:
   size_t size() const   { return len; }
   size_t length() const { return len; }
   bool empty() const    { return len != 0; }
-  void shrink_to_fit() {}
+  void shrink_to_fit() { /* Being there, but doing nothing */}
 
   // Alement access
   char* data()              { return string_data::data; }
index 9f07568..8be69df 100644 (file)
@@ -160,8 +160,8 @@ const char* MC_smx_actor_get_host_name(smx_actor_t actor)
   */
   union fake_host {
     simgrid::s4u::Host host;
-    fake_host() {}
-    ~fake_host() {}
+    fake_host() { /* Nothing to do*/}
+    ~fake_host() { /* Nothing to do*/}
   };
   fake_host foo;
   const size_t offset = (char*)&foo.host.getName() - (char*)&foo.host;
index 951b60c..62c317c 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2008-2015. The SimGrid Team.
+/* Copyright (c) 2008-2017. The SimGrid Team.
  * All rights reserved.                                                     */
 
 /* This program is free software; you can redistribute it and/or modify it
@@ -38,8 +38,8 @@ private:
   T buffer;
 
 public:
-  Remote() {}
-  ~Remote() {}
+  Remote() { /* Nothing to do */}
+  ~Remote() { /* Nothing to do */}
   Remote(T& p) { std::memcpy(&buffer, &p, sizeof(buffer)); }
   Remote(Remote const& that) { std::memcpy(&buffer, &that.buffer, sizeof(buffer)); }
   Remote& operator=(Remote const& that)
index a8962f7..6b96776 100644 (file)
@@ -99,6 +99,7 @@ static void* mm_fake_realloc(void *p, size_t s)
 
 static void mm_fake_free(void *p)
 {
+  // Nothing to do
 }
 
 /* Function signatures for the main malloc functions: */