Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
More Sonar smells around "noreturn".
authorArnaud Giersch <arnaud.giersch@univ-fcomte.fr>
Fri, 3 May 2019 15:37:02 +0000 (17:37 +0200)
committerArnaud Giersch <arnaud.giersch@univ-fcomte.fr>
Fri, 3 May 2019 19:39:40 +0000 (21:39 +0200)
Missing attribute, and remove dead code.

src/include/mc/mc.h
src/mc/ModelChecker.cpp
src/mc/mc_global.cpp

index b96e69a..b502542 100644 (file)
@@ -25,7 +25,7 @@
 SG_BEGIN_DECL()
 
 /********************************* Global *************************************/
-XBT_PUBLIC void MC_run();
+XBT_ATTRIB_NORETURN XBT_PUBLIC void MC_run();
 XBT_PUBLIC void MC_process_clock_add(smx_actor_t, double);
 XBT_PUBLIC double MC_process_clock_get(smx_actor_t);
 XBT_PRIVATE void MC_automaton_load(const char *file);
index 439e677..2d6a04b 100644 (file)
@@ -265,7 +265,6 @@ bool ModelChecker::handle_message(char* buffer, ssize_t size)
   case MC_MESSAGE_ASSERTION_FAILED:
     MC_report_assertion_error();
     this->exit(SIMGRID_MC_EXIT_SAFETY);
-    break;
 
   default:
     xbt_die("Unexpected message from model-checked application");
index c9b5ba6..0a48a28 100644 (file)
@@ -97,7 +97,6 @@ void MC_run()
   MC_ignore_heap(simgrid::mc::processes_time.data(),
     simgrid::mc::processes_time.size() * sizeof(simgrid::mc::processes_time[0]));
   simgrid::mc::Client::get()->mainLoop();
-  simgrid::mc::processes_time.clear();
 }
 
 void MC_show_deadlock()