Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
more bad fixes
authorAugustin Degomme <augustin.degomme@unibas.ch>
Tue, 13 Mar 2018 01:42:07 +0000 (02:42 +0100)
committerAugustin Degomme <augustin.degomme@unibas.ch>
Tue, 13 Mar 2018 01:42:07 +0000 (02:42 +0100)
src/mc/checker/CommunicationDeterminismChecker.cpp
teshsuite/s4u/actor/actor.cpp
tools/cmake/GCCFlags.cmake

index 4fedf30..ac155f2 100644 (file)
@@ -245,7 +245,7 @@ void CommunicationDeterminismChecker::get_comm_pattern(xbt_dynar_t list, smx_sim
   } else
     xbt_die("Unexpected call_type %i", (int) call_type);
 
-  XBT_DEBUG("Insert incomplete comm pattern %p for process %lu", pattern.get(), issuer->pid);
+  XBT_DEBUG("Insert incomplete comm pattern %p for process %ld", pattern.get(), issuer->pid);
   xbt_dynar_t dynar = xbt_dynar_get_as(incomplete_communications_pattern, issuer->pid, xbt_dynar_t);
   simgrid::mc::PatternCommunication* pattern2 = pattern.release();
   xbt_dynar_push(dynar, &pattern2);
index be1e9de..c3be30e 100644 (file)
@@ -10,7 +10,7 @@ XBT_LOG_NEW_DEFAULT_CATEGORY(s4u_test, "Messages specific for this s4u example")
 static void worker()
 {
   simgrid::s4u::this_actor::sleep_for(.5);
-  XBT_INFO("Worker started (PID:%lu, PPID:%lu)", simgrid::s4u::this_actor::getPid(),
+  XBT_INFO("Worker started (PID:%ld, PPID:%ld)", simgrid::s4u::this_actor::getPid(),
            simgrid::s4u::this_actor::getPpid());
   while (1) {
     XBT_INFO("Plop i am %ssuspended", simgrid::s4u::this_actor::isSuspended() ? "" : "not ");
@@ -26,7 +26,7 @@ static void master()
   simgrid::s4u::this_actor::getHost()->actorList(actor_list);
 
   for (auto const& actor : *actor_list) {
-    XBT_INFO("Actor (pid=%lu, ppid=%lu, name=%s)", actor->getPid(), actor->getPpid(), actor->getCname());
+    XBT_INFO("Actor (pid=%ld, ppid=%ld, name=%s)", actor->getPid(), actor->getPpid(), actor->getCname());
     if (simgrid::s4u::this_actor::getPid() != actor->getPid())
       actor->kill();
   }
@@ -35,16 +35,16 @@ static void master()
       simgrid::s4u::Actor::createActor("worker from master", simgrid::s4u::this_actor::getHost(), worker);
   simgrid::s4u::this_actor::sleep_for(2);
 
-  XBT_INFO("Suspend Actor (pid=%lu)", actor->getPid());
+  XBT_INFO("Suspend Actor (pid=%ld)", actor->getPid());
   actor->suspend();
 
-  XBT_INFO("Actor (pid=%lu) is %ssuspended", actor->getPid(), actor->isSuspended() ? "" : "not ");
+  XBT_INFO("Actor (pid=%ld) is %ssuspended", actor->getPid(), actor->isSuspended() ? "" : "not ");
   simgrid::s4u::this_actor::sleep_for(2);
 
-  XBT_INFO("Resume Actor (pid=%lu)", actor->getPid());
+  XBT_INFO("Resume Actor (pid=%ld)", actor->getPid());
   actor->resume();
 
-  XBT_INFO("Actor (pid=%lu) is %ssuspended", actor->getPid(), actor->isSuspended() ? "" : "not ");
+  XBT_INFO("Actor (pid=%ld) is %ssuspended", actor->getPid(), actor->isSuspended() ? "" : "not ");
   simgrid::s4u::this_actor::sleep_for(2);
   actor->kill();
 
index c38cac7..b147dbf 100644 (file)
@@ -24,6 +24,12 @@ if(enable_compile_warnings)
   if(CMAKE_COMPILER_IS_GNUCC)
     set(warnCFLAGS "${warnCFLAGS} -Wclobbered -Wno-error=clobbered  -Wno-unused-local-typedefs -Wno-error=attributes")
   endif()
+  if (CMAKE_CXX_COMPILER_ID MATCHES "Intel")
+    # ignore remark  #1418: external function definition with no prior declaration
+    # 3179: deprecated conversion of string literal to char* (should be const char*)
+    # 191: type qualifier is meaningless on cast type
+    set(warnCFLAGS "${warnCFLAGS} -wd1418 -wd191 -wd3179")
+  endif()
 
   set(warnCXXFLAGS "${warnCFLAGS} -Wall -Wextra -Wunused -Wmissing-declarations -Wpointer-arith -Wchar-subscripts -Wcomment -Wformat -Wwrite-strings -Wno-unused-function -Wno-unused-parameter -Wno-strict-aliasing")
   if(CMAKE_COMPILER_IS_GNUCXX AND (NOT (CMAKE_CXX_COMPILER_VERSION VERSION_LESS "5.0")))
@@ -41,13 +47,6 @@ if(enable_compile_warnings)
     set(warnCXXFLAGS "${warnCXXFLAGS} -Wno-mismatched-tags -Wno-extern-c-compat")
   endif()
 
-  if (CMAKE_CXX_COMPILER_ID MATCHES "Intel")
-    # ignore remark  #1418: external function definition with no prior declaration
-    # 3179: deprecated conversion of string literal to char* (should be const char*)
-    # 191: type qualifier is meaningless on cast type
-    set(warnCXXFLAGS "${warnCXXFLAGS} -wd1418 -wd191 -wd3179")
-  endif()
-
   # the one specific to C but refused by C++
   set(warnCFLAGS "${warnCFLAGS} -Wmissing-prototypes")