Explorar o código

Fix compiler warning

Tatsuhiro Tsujikawa %!s(int64=12) %!d(string=hai) anos
pai
achega
bd671403bc
Modificáronse 1 ficheiros con 4 adicións e 2 borrados
  1. 4 2
      src/SegmentMan.cc

+ 4 - 2
src/SegmentMan.cc

@@ -144,7 +144,8 @@ SharedHandle<Segment> SegmentMan::checkoutSegment
     // Flush cached data here, because the cached data may be overlapped
     // if BT peers are involved.
     A2_LOG_DEBUG(fmt("Flushing cached data, size=%lu",
-                     piece->getWrDiskCacheEntry()->getSize()));
+                     static_cast<unsigned long>(piece->getWrDiskCacheEntry()->
+                                                getSize())));
     flushWrDiskCache(pieceStorage_->getWrDiskCache(), piece);
   }
 
@@ -295,7 +296,8 @@ void SegmentMan::cancelSegmentInternal
     // Flush cached data here, because the cached data may be overlapped
     // if BT peers are involved.
     A2_LOG_DEBUG(fmt("Flushing cached data, size=%lu",
-                     piece->getWrDiskCacheEntry()->getSize()));
+                     static_cast<unsigned long>(piece->getWrDiskCacheEntry()
+                                                ->getSize())));
     flushWrDiskCache(pieceStorage_->getWrDiskCache(), piece);
     // TODO Exception may cause some segments (pieces) are not
     // canceled.