]> AND Private Git Repository - loba.git/commitdiff
Logo AND Algorithmique Numérique Distribuée

Private GIT Repository
Use %zu instead of casting argument.
authorArnaud Giersch <arnaud.giersch@iut-bm.univ-fcomte.fr>
Fri, 4 Feb 2011 07:54:10 +0000 (08:54 +0100)
committerArnaud Giersch <arnaud.giersch@iut-bm.univ-fcomte.fr>
Fri, 4 Feb 2011 07:54:44 +0000 (08:54 +0100)
communicator.cpp
deployment.cpp
hostdata.cpp
main.cpp
process.cpp

index 080842619541038f29bba85cfc051a28a8a531d5..649ff806b6e4529b94144e0e127c9646200fab74 100644 (file)
@@ -64,11 +64,11 @@ communicator::~communicator()
     if (data_comm)
         XBT_WARN("data_comm is pending!");
     if (!received.empty())
-        XBT_WARN("lost %lu received message%s!",
-                 (unsigned long )received.size(), ESSE(received.size()));
+        XBT_WARN("lost %zu received message%s!",
+                 received.size(), ESSE(received.size()));
     if (!sent_comm.empty())
-        XBT_WARN("lost %lu sent message%s!",
-                 (unsigned long )sent_comm.size(), ESSE(sent_comm.size()));
+        XBT_WARN("lost %zu sent message%s!",
+                 sent_comm.size(), ESSE(sent_comm.size()));
 
     xbt_cond_destroy(cond);
     xbt_mutex_destroy(mutex);
index 5659db655f4ba75780f74fc21d2d3dbbff9df50d..fa9e73105897ebe2262c9f0c64eca66d0619e466 100644 (file)
@@ -138,9 +138,8 @@ void deployment_torus::generate()
     // here width == ceil(sqrt(size))
 
     unsigned first_on_last_line = (size() - 1) - (size() - 1) % width;
-    XBT_DEBUG("torus size = %u ; width = %u ; height = %u ; foll = %u",
-              (unsigned )size(), width,
-              (unsigned )(size() / width + !!(size() % width)),
+    XBT_DEBUG("torus size = %zu ; width = %u ; height = %zu ; foll = %u",
+              size(), width, size() / width + !!(size() % width),
               first_on_last_line);
     for (unsigned i = 0; i < size(); i++) {
         unsigned next_line;
index 4d710543ce1882472d1bc0b0a654397f16894d56..787b7ab926a3804c961c7ba3dd7c1a53e4b84671 100644 (file)
@@ -36,7 +36,7 @@ void hostdata::create()
     e_xbt_log_priority_t logp = xbt_log_priority_verbose;
     if (!LOG_ISENABLED(logp))
         return;
-    XBT_LOG(logp, "Got %lu hosts.", (unsigned long)hosts.size());
+    XBT_LOG(logp, "Got %zu hosts.", hosts.size());
     for (int i = 0; i < nhosts; i++) {
         XBT_LOG(logp, "Host #%d named \"%s\".", i, hosts[i].get_name());
     }
index dcefafcf3c2fdc83f8091e1a63ac38a91e34df56..8b5c3bd5f6da78ba837e0603585225923c978c18 100644 (file)
--- a/main.cpp
+++ b/main.cpp
@@ -172,8 +172,8 @@ int main(int argc, char* argv[])
             if (!opt::auto_depl::nhosts)
                 opt::auto_depl::nhosts = hostdata::size();
             if (opt::auto_depl::nhosts > hostdata::size()) {
-                XBT_WARN("%u hosts is too much: limiting to %u",
-                         opt::auto_depl::nhosts, (unsigned )hostdata::size());
+                XBT_WARN("%u hosts is too much: limiting to %zu",
+                         opt::auto_depl::nhosts, hostdata::size());
                 opt::auto_depl::nhosts = hostdata::size();
             }
             if (!opt::auto_depl::load)
index 4501dab9517d1290415c0a1c6223d50805badfcd..8a165c100d364bd0861267c86cdcd7dbec0e3c0e 100644 (file)
@@ -310,8 +310,7 @@ void process::finalize()
     finalizing = true;
     total_load_running -= real_load;
 
-    XBT_DEBUG("send CLOSE to %lu neighbor%s",
-              (unsigned long )neigh.size(), ESSE(neigh.size()));
+    XBT_DEBUG("send CLOSE to %zu neighbor%s", neigh.size(), ESSE(neigh.size()));
     std::for_each(neigh.begin(), neigh.end(),
                   bind(&process::finalize1, this, _1));