From: Augustin Degomme Date: Tue, 13 Mar 2018 01:08:27 +0000 (+0100) Subject: try to stabilize gcc with previous fixes X-Git-Tag: v3.19~78^2~4 X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/commitdiff_plain/7becbfd663eec7e290caa5580974a84dc5f65650 try to stabilize gcc with previous fixes --- diff --git a/src/kernel/activity/MutexImpl.cpp b/src/kernel/activity/MutexImpl.cpp index 6b94db74bc..7d90c8a7aa 100644 --- a/src/kernel/activity/MutexImpl.cpp +++ b/src/kernel/activity/MutexImpl.cpp @@ -81,7 +81,7 @@ void MutexImpl::unlock(smx_actor_t issuer) /* If the mutex is not owned by the issuer, that's not good */ if (issuer != this->owner) - THROWF(mismatch_error, 0, "Cannot release that mutex: it was locked by %s (pid:%lu), not by you.", + THROWF(mismatch_error, 0, "Cannot release that mutex: it was locked by %s (pid:%ld), not by you.", this->owner->getCname(), this->owner->pid); if (not this->sleeping.empty()) { diff --git a/src/simix/smx_global.cpp b/src/simix/smx_global.cpp index 4ea34c271d..2a650eb844 100644 --- a/src/simix/smx_global.cpp +++ b/src/simix/smx_global.cpp @@ -661,12 +661,12 @@ void SIMIX_display_process_status() if (boost::dynamic_pointer_cast(process->waiting_synchro) != nullptr) synchro_description = "I/O"; - XBT_INFO("Process %lu (%s@%s): waiting for %s synchro %p (%s) in state %d to finish", process->pid, + XBT_INFO("Process %ld (%s@%s): waiting for %s synchro %p (%s) in state %d to finish", process->pid, process->getCname(), process->host->getCname(), synchro_description, process->waiting_synchro.get(), process->waiting_synchro->name.c_str(), (int)process->waiting_synchro->state); } else { - XBT_INFO("Process %lu (%s@%s)", process->pid, process->getCname(), process->host->getCname()); + XBT_INFO("Process %ld (%s@%s)", process->pid, process->getCname(), process->host->getCname()); } } } diff --git a/src/smpi/internals/smpi_process.cpp b/src/smpi/internals/smpi_process.cpp index 1d677e5eef..2e173de0c1 100644 --- a/src/smpi/internals/smpi_process.cpp +++ b/src/smpi/internals/smpi_process.cpp @@ -81,14 +81,14 @@ void Process::set_data(int* argc, char*** argv) argv_ = argv; // set the process attached to the mailbox mailbox_small_->setReceiver(process_); - XBT_DEBUG("<%lu> SMPI process has been initialized: %p", process_->getPid(), process_.get()); + XBT_DEBUG("<%ld> SMPI process has been initialized: %p", process_->getPid(), process_.get()); } /** @brief Prepares the current process for termination. */ void Process::finalize() { state_ = SMPI_FINALIZED; - XBT_DEBUG("<%lu> Process left the game", process_->getPid()); + XBT_DEBUG("<%ld> Process left the game", process_->getPid()); // This leads to an explosion of the search graph which cannot be reduced: if(MC_is_active() || MC_record_replay_is_active()) diff --git a/src/smpi/internals/smpi_shared.cpp b/src/smpi/internals/smpi_shared.cpp index b8b50fd24e..b4f18ebe0c 100644 --- a/src/smpi/internals/smpi_shared.cpp +++ b/src/smpi/internals/smpi_shared.cpp @@ -284,7 +284,7 @@ void* smpi_shared_malloc_partial(size_t size, size_t* shared_block_offsets, int strerror(errno)); } size_t low_page_start_offset = ALIGN_UP((int64_t)start_offset, PAGE_SIZE); - size_t low_page_stop_offset = start_block_offset < ALIGN_DOWN((int64_t)stop_offset, PAGE_SIZE) ? start_block_offset : ALIGN_DOWN((int64_t)stop_offset, PAGE_SIZE); + size_t low_page_stop_offset = (int64_t)start_block_offset < ALIGN_DOWN((int64_t)stop_offset, PAGE_SIZE) ? start_block_offset : ALIGN_DOWN((int64_t)stop_offset, (int64_t)PAGE_SIZE); if(low_page_start_offset < low_page_stop_offset) { XBT_DEBUG("\t\tglobal shared allocation, mmap block start"); void* pos = (void*)((unsigned long)mem + low_page_start_offset); diff --git a/src/smpi/mpi/smpi_f2c.cpp b/src/smpi/mpi/smpi_f2c.cpp index e363973407..1bc9a7f21e 100644 --- a/src/smpi/mpi/smpi_f2c.cpp +++ b/src/smpi/mpi/smpi_f2c.cpp @@ -39,7 +39,7 @@ char* F2C::get_key(char* key, int id) { } char* F2C::get_key_id(char* key, int id) { - std::snprintf(key, KEY_SIZE, "%x_%lu", static_cast(id), simgrid::s4u::Actor::self()->getPid()); + std::snprintf(key, KEY_SIZE, "%x_%ld", static_cast(id), simgrid::s4u::Actor::self()->getPid()); return key; }