From 75017bc9818bae0f22a79e0ec60e0aad6e152577 Mon Sep 17 00:00:00 2001 From: Alex Rousskov Date: Fri, 14 Oct 2011 16:43:20 -0600 Subject: [PATCH] Avoid "double to int" compiler warnings. Could also use integer arithmetic instead of 1e3 double, but it is often safer to use doubles when it comes to formulas because significant integer rounding errors are difficult to spot. --- src/DiskIO/IpcIo/IpcIoFile.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/DiskIO/IpcIo/IpcIoFile.cc b/src/DiskIO/IpcIo/IpcIoFile.cc index 3f6a889e5d..cb8869d138 100644 --- a/src/DiskIO/IpcIo/IpcIoFile.cc +++ b/src/DiskIO/IpcIo/IpcIoFile.cc @@ -367,7 +367,7 @@ IpcIoFile::canWait() const if (ioRate > 0) { // if there are N requests pending, the new one will wait at // least N/max-swap-rate seconds - rateWait = 1e3 * queue->outSize(diskId) / ioRate; + rateWait = static_cast(1e3 * queue->outSize(diskId) / ioRate); // adjust N/max-swap-rate value based on the queue "balance" // member, in case we have been borrowing time against future // I/O already -- 2.47.3