Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
codacy
authorMartin Quinson <martin.quinson@loria.fr>
Sat, 8 Jul 2017 21:50:11 +0000 (23:50 +0200)
committerMartin Quinson <martin.quinson@loria.fr>
Sat, 8 Jul 2017 22:18:07 +0000 (00:18 +0200)
src/mc/compare.cpp
src/xbt/automaton/automaton.c
teshsuite/msg/host_on_off_processes/host_on_off_processes.c
teshsuite/surf/surf_usage/surf_usage.cpp

index a5845c8..e5a873b 100644 (file)
@@ -1642,7 +1642,6 @@ int snapshot_compare(int num1, simgrid::mc::Snapshot* s1, int num2, simgrid::mc:
       XBT_DEBUG("(%d - %d) Different local variables between stacks %d", num1,
                 num2, cursor + 1);
       errors++;
       XBT_DEBUG("(%d - %d) Different local variables between stacks %d", num1,
                 num2, cursor + 1);
       errors++;
-      is_diff = 1;
 #else
 
 #ifdef MC_VERBOSE
 #else
 
 #ifdef MC_VERBOSE
index 0154441..7f3c746 100644 (file)
@@ -1,7 +1,6 @@
 /* automaton - representation of büchi automaton */
 
 /* automaton - representation of büchi automaton */
 
-/* Copyright (c) 2011-2015. The SimGrid Team.
- * All rights reserved.                                                     */
+/* Copyright (c) 2011-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. */
@@ -227,8 +226,7 @@ XBT_PUBLIC(xbt_automaton_propositional_symbol_t) xbt_automaton_propositional_sym
   xbt_automaton_propositional_symbol_callback_type callback,
   void* data, xbt_automaton_propositional_symbol_free_function_type free_function)
 {
   xbt_automaton_propositional_symbol_callback_type callback,
   void* data, xbt_automaton_propositional_symbol_free_function_type free_function)
 {
-  xbt_automaton_propositional_symbol_t prop_symb = NULL;
-  prop_symb = xbt_new0(struct xbt_automaton_propositional_symbol, 1);
+  xbt_automaton_propositional_symbol_t prop_symb = xbt_new0(struct xbt_automaton_propositional_symbol, 1);
   prop_symb->pred = xbt_strdup(id);
   prop_symb->callback = callback;
   prop_symb->data = data;
   prop_symb->pred = xbt_strdup(id);
   prop_symb->callback = callback;
   prop_symb->data = data;
index a76bd53..754264b 100644 (file)
@@ -1,10 +1,9 @@
-/* Copyright (c) 2010-2015. The SimGrid Team.
- * All rights reserved.                                                     */
+/* Copyright (c) 2010-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. */
 
-#include "simgrid/msg.h"            /* Yeah! If you want to use msg, you need to include simgrid/msg.h */
+#include "simgrid/msg.h"
 
 XBT_LOG_NEW_DEFAULT_CATEGORY(msg_test, "Messages specific for this msg example");
 
 
 XBT_LOG_NEW_DEFAULT_CATEGORY(msg_test, "Messages specific for this msg example");
 
@@ -37,10 +36,9 @@ static int process_sleep(int argc, char *argv[])
 
 static int commTX(int argc, char *argv[])
 {
 
 static int commTX(int argc, char *argv[])
 {
-  msg_task_t task = NULL;
   const char * mailbox = "comm";
   XBT_INFO("  Start TX");
   const char * mailbox = "comm";
   XBT_INFO("  Start TX");
-  task = MSG_task_create("COMM", 0, 100000000, NULL);
+  msg_task_t task = MSG_task_create("COMM", 0, 100000000, NULL);
   MSG_task_isend(task, mailbox);
   // We should wait a bit (if not the process will end before the communication, hence an exception on the other side).
   MSG_process_sleep(30);
   MSG_task_isend(task, mailbox);
   // We should wait a bit (if not the process will end before the communication, hence an exception on the other side).
   MSG_process_sleep(30);
index 1c92988..90914d6 100644 (file)
@@ -63,11 +63,10 @@ int main(int argc, char **argv)
 
   surf_solve(-1.0);
   do {
 
   surf_solve(-1.0);
   do {
-    simgrid::surf::ActionList *action_list = nullptr;
     XBT_INFO("Next Event : %g", surf_get_clock());
     XBT_DEBUG("\t CPU actions");
 
     XBT_INFO("Next Event : %g", surf_get_clock());
     XBT_DEBUG("\t CPU actions");
 
-    action_list = surf_cpu_model_pm->getFailedActionSet();
+    simgrid::surf::ActionList* action_list = surf_cpu_model_pm->getFailedActionSet();
     for(simgrid::surf::ActionList::iterator it(action_list->begin()), itNext = it, itend(action_list->end()) ;
         it != itend ; it=itNext) {
       ++itNext;
     for(simgrid::surf::ActionList::iterator it(action_list->begin()), itNext = it, itend(action_list->end()) ;
         it != itend ; it=itNext) {
       ++itNext;