Pārlūkot izejas kodu

Fix compiler warning with Android NDK clang

Tatsuhiro Tsujikawa 8 gadi atpakaļ
vecāks
revīzija
857d6a2a8e

+ 2 - 1
src/AbstractSingleDiskAdaptor.cc

@@ -97,7 +97,8 @@ ssize_t AbstractSingleDiskAdaptor::readDataDropCache(unsigned char* data,
 void AbstractSingleDiskAdaptor::writeCache(const WrDiskCacheEntry* entry)
 {
   for (auto& d : entry->getDataSet()) {
-    A2_LOG_DEBUG(fmt("Cache flush goff=%" PRId64 ", len=%lu", d->goff, d->len));
+    A2_LOG_DEBUG(fmt("Cache flush goff=%" PRId64 ", len=%lu", d->goff,
+                     static_cast<unsigned long>(d->len)));
     writeData(d->data + d->offset, d->len, d->goff);
   }
 }

+ 2 - 1
src/MultiDiskAdaptor.cc

@@ -413,7 +413,8 @@ ssize_t MultiDiskAdaptor::readData(unsigned char* data, size_t len,
 void MultiDiskAdaptor::writeCache(const WrDiskCacheEntry* entry)
 {
   for (auto& d : entry->getDataSet()) {
-    A2_LOG_DEBUG(fmt("Cache flush goff=%" PRId64 ", len=%lu", d->goff, d->len));
+    A2_LOG_DEBUG(fmt("Cache flush goff=%" PRId64 ", len=%lu", d->goff,
+                     static_cast<unsigned long>(d->len)));
     writeData(d->data + d->offset, d->len, d->goff);
   }
 }

+ 1 - 1
src/RequestGroupMan.cc

@@ -1106,7 +1106,7 @@ int RequestGroupMan::optimizeConcurrentDownloads()
   A2_LOG_DEBUG(
       fmt("Max concurrent downloads optimized at %d (%lu currently active) "
           "[optimization speed %sB/s, current speed %sB/s]",
-          maxConcurrentDownloads, numActive_,
+          maxConcurrentDownloads, static_cast<unsigned long>(numActive_),
           util::abbrevSize(optimizationSpeed_).c_str(),
           util::abbrevSize(currentSpeed).c_str()));