Fix compiler warning with Android NDK clang

pull/857/head
Tatsuhiro Tsujikawa 2017-01-23 00:58:44 +09:00
parent 13b2c4a0f9
commit 857d6a2a8e
3 changed files with 5 additions and 3 deletions

View File

@ -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);
}
}

View File

@ -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);
}
}

View File

@ -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()));