Skip to content

Commit

Permalink
Fix compiler warning with Android NDK clang
Browse files Browse the repository at this point in the history
  • Loading branch information
tatsuhiro-t committed Jan 22, 2017
1 parent 13b2c4a commit 857d6a2
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 3 deletions.
3 changes: 2 additions & 1 deletion src/AbstractSingleDiskAdaptor.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
}
Expand Down
3 changes: 2 additions & 1 deletion src/MultiDiskAdaptor.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
}
Expand Down
2 changes: 1 addition & 1 deletion src/RequestGroupMan.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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()));

Expand Down

0 comments on commit 857d6a2

Please sign in to comment.