Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
codacy
authorMartin Quinson <martin.quinson@loria.fr>
Thu, 13 Jul 2017 10:41:00 +0000 (12:41 +0200)
committerMartin Quinson <martin.quinson@loria.fr>
Thu, 13 Jul 2017 21:45:46 +0000 (23:45 +0200)
src/bindings/java/org/simgrid/msg/Process.java
src/mc/ChunkedData.hpp
src/mc/DwarfExpression.hpp
src/xbt/memory_map.cpp

index 355856d..43dc342 100644 (file)
@@ -313,7 +313,7 @@ public abstract class Process implements Runnable {
        }
 
        /**
        }
 
        /**
-        * The main function of the process (to implement).
+        * The main function of the process (to implement by the user).
         *
         * @param args
         * @throws MsgException
         *
         * @param args
         * @throws MsgException
index 330f2c9..9652ea1 100644 (file)
@@ -51,7 +51,7 @@ public:
   ChunkedData(ChunkedData const& that)
      : store_ (that.store_)
      , pagenos_(that.pagenos_)
   ChunkedData(ChunkedData const& that)
      : store_ (that.store_)
      , pagenos_(that.pagenos_)
-            
+
   {
     for (std::size_t pageno : pagenos_)
       store_->ref_page(pageno);
   {
     for (std::size_t pageno : pagenos_)
       store_->ref_page(pageno);
index 4b1f202..1bf89d8 100644 (file)
@@ -1,5 +1,4 @@
-/* Copyright (c) 2015. The SimGrid Team.
- * All rights reserved.                                                     */
+/* Copyright (c) 2015-2017. The SimGrid Team. All rights reserved.          */
 
 /* This program is free software; you can redistribute it and/or modify it
  * under the terms of the license (GNU LGPL) which comes with this package. */
 
 /* This program is free software; you can redistribute it and/or modify it
  * under the terms of the license (GNU LGPL) which comes with this package. */
@@ -72,7 +71,7 @@ public:
   static const std::size_t max_size = 64;
 private:
   // Values of the stack (the top is stack_[size_ - 1]):
   static const std::size_t max_size = 64;
 private:
   // Values of the stack (the top is stack_[size_ - 1]):
-  uintptr_t stack_[max_size];
+  uintptr_t stack_[max_size] {0};
   size_t size_;
 public:
   ExpressionStack() : size_(0) {}
   size_t size_;
 public:
   ExpressionStack() : size_(0) {}
index ae6113c..b2185d7 100644 (file)
@@ -232,7 +232,6 @@ XBT_PRIVATE std::vector<VmMap> get_memory_map(pid_t pid)
       xbt_abort();
 
     memreg.prot = 0;
       xbt_abort();
 
     memreg.prot = 0;
-
     for (i = 0; i < 3; i++){
       switch(lfields[1][i]){
         case 'r':
     for (i = 0; i < 3; i++){
       switch(lfields[1][i]){
         case 'r':
@@ -251,6 +250,7 @@ XBT_PRIVATE std::vector<VmMap> get_memory_map(pid_t pid)
     if (memreg.prot == 0)
       memreg.prot |= PROT_NONE;
 
     if (memreg.prot == 0)
       memreg.prot |= PROT_NONE;
 
+    memreg.flags = 0;
     if (lfields[1][3] == 'p') {
       memreg.flags |= MAP_PRIVATE;
     } else {
     if (lfields[1][3] == 'p') {
       memreg.flags |= MAP_PRIVATE;
     } else {