diff --git a/db/db_impl.cc b/db/db_impl.cc index 77d6ca04c..1dc8eb1dc 100644 --- a/db/db_impl.cc +++ b/db/db_impl.cc @@ -957,7 +957,8 @@ Status DBImpl::RetainProbableWalFiles(VectorLogPtr& all_logs, end = mid - 1; } } - size_t start_index = std::max(0l, end); // end could be -ve. + // end could be -ve. + size_t start_index = std::max(static_cast(0), end); // The last wal file is always included all_logs.erase(all_logs.begin(), all_logs.begin() + start_index); return Status::OK();