Refactor the CMake file to work with CMake 3.8.2
[folly.git] / folly / MPMCQueue.h
index 22798880d4e9c58e3ddbb34382f6711f1475f370..b0cfc46f6dfc833c839544f055bd12f4282835fd 100644 (file)
@@ -1155,7 +1155,7 @@ class MPMCQueueBase<Derived<T, Atom, Dynamic>> : boost::noncopyable {
       ticket = numPushes;
       const auto numPops = popTicket_.load(std::memory_order_acquire); // B
       // n will be negative if pops are pending
-      const int64_t n = numPushes - numPops;
+      const int64_t n = int64_t(numPushes - numPops);
       if (n >= static_cast<ssize_t>(capacity_)) {
         // Full, linearize at B.  We don't need to recheck the read we
         // performed at A, because if numPushes was stale at B then the