Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Merge branch 'master' of scm.gforge.inria.fr:/gitroot/simgrid/simgrid
authorMartin Quinson <martin.quinson@loria.fr>
Wed, 22 Jun 2016 20:32:13 +0000 (22:32 +0200)
committerMartin Quinson <martin.quinson@loria.fr>
Wed, 22 Jun 2016 20:32:13 +0000 (22:32 +0200)
examples/smpi/NAS/dt.c
src/simix/smx_process.cpp
tools/cmake/GCCFlags.cmake

index 341eaa2..55b29dd 100644 (file)
@@ -672,12 +672,12 @@ int main(int argc,char **argv ){
     dg=buildSH(class);
   }
 
-  if(timer_on != 0 && dg && dg->numNodes+1>timers_tot){
+  if(timer_on != 0 && dg->numNodes+1>timers_tot){
     timer_on=0;
     if(my_rank==0)
     fprintf(stderr,"Not enough timers. Node timeing is off. \n");
   }
-  if(dg && dg->numNodes>comm_size){
+  if(dg->numNodes>comm_size){
     if(my_rank==0){
     fprintf(stderr,"**  The number of MPI processes should not be less than \n");
     fprintf(stderr,"**  the number of nodes in the graph\n");
@@ -687,7 +687,7 @@ int main(int argc,char **argv ){
     MPI_Finalize();
     exit(0);
   }
-  for(i=0;i<dg->numNodes;i++){
+  for(i=0; i<dg->numNodes; i++){
     dg->node[i]->address=i;
   }
   if( my_rank == 0 ){
index d1ed841..bb91a10 100644 (file)
@@ -754,7 +754,7 @@ xbt_dict_t SIMIX_process_get_properties(smx_process_t process)
 void simcall_HANDLER_process_join(smx_simcall_t simcall, smx_process_t process, double timeout)
 {
   if (process->finished) {
-    // The process is already finished, just wake up the process right now:
+    // The joined process is already finished, just wake up the issuer process right away
     simcall_process_sleep__set__result(simcall, SIMIX_DONE);
     SIMIX_simcall_answer(simcall);
     return;
index f71ff39..0a17197 100644 (file)
@@ -13,8 +13,8 @@ set(warnCFLAGS "")
 set(optCFLAGS "")
 set(warnCXXFLAGS "")
 
-if(enable_compile_warnings AND enable_debug)
-  set(warnCFLAGS "-fno-common -Wall -Wunused -Wmissing-declarations -Wpointer-arith -Wchar-subscripts -Wcomment -Wformat -Wwrite-strings -Wno-unused-function -Wno-unused-parameter -Wno-strict-aliasing -Wno-format-nonliteral -Werror")
+if(enable_compile_warnings)
+  set(warnCFLAGS "-fno-common -Wall -Wunused -Wmissing-declarations -Wpointer-arith -Wchar-subscripts -Wcomment -Wformat -Wwrite-strings -Wno-unused-function -Wno-unused-parameter -Wno-strict-aliasing -Wno-format-nonliteral")
   if(CMAKE_COMPILER_IS_GNUCC)
     set(warnCFLAGS "${warnCFLAGS} -Wclobbered -Wno-error=clobbered  -Wno-unused-local-typedefs -Wno-error=attributes")
   endif()
@@ -34,6 +34,11 @@ if(enable_compile_warnings AND enable_debug)
   set(CMAKE_JAVA_COMPILE_FLAGS "-Xlint")
 endif()
 
+# NDEBUG gives a lot of "initialized but unused variables" errors. Don't die anyway.
+if(enable_compile_warnings AND enable_debug)
+  set(warnCFLAGS "${warnCFLAGS} -Werror")
+endif()
+
 # Activate the warnings on #if FOOBAR when FOOBAR has no value
 # It breaks on FreeBSD within Boost headers, so activate this only in Pure Hardcore debug mode.
 if(enable_maintainer_mode)