From ac3f3f37196588bdd8a8b240d120787853a34dff Mon Sep 17 00:00:00 2001 From: longlijian Date: Thu, 8 Jul 2021 10:07:37 -0700 Subject: [PATCH] =?UTF-8?q?Eliminate=20compiler=20complaining,=20which=20t?= =?UTF-8?q?he=20return=20type=20of=20the=20function=E2=80=A6=20(#8498)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Summary: … should be uint64_t. Pull Request resolved: https://github.com/facebook/rocksdb/pull/8498 Reviewed By: jay-zhuang Differential Revision: D29605064 Pulled By: ajkr fbshipit-source-id: e431448ac9d8a37ae83679c4cc5732e29fe49de4 --- db/db_impl/db_impl.h | 2 +- db/db_impl/db_impl_debug.cc | 2 +- db/version_set.cc | 2 +- db/version_set.h | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/db/db_impl/db_impl.h b/db/db_impl/db_impl.h index 89e1719a6..8f28b4af0 100644 --- a/db/db_impl/db_impl.h +++ b/db/db_impl/db_impl.h @@ -965,7 +965,7 @@ class DBImpl : public DB { // Return the maximum overlapping data (in bytes) at next level for any // file at a level >= 1. - int64_t TEST_MaxNextLevelOverlappingBytes( + uint64_t TEST_MaxNextLevelOverlappingBytes( ColumnFamilyHandle* column_family = nullptr); // Return the current manifest file no. diff --git a/db/db_impl/db_impl_debug.cc b/db/db_impl/db_impl_debug.cc index a9f22458e..821925f92 100644 --- a/db/db_impl/db_impl_debug.cc +++ b/db/db_impl/db_impl_debug.cc @@ -43,7 +43,7 @@ bool DBImpl::TEST_WALBufferIsEmpty(bool lock) { return res; } -int64_t DBImpl::TEST_MaxNextLevelOverlappingBytes( +uint64_t DBImpl::TEST_MaxNextLevelOverlappingBytes( ColumnFamilyHandle* column_family) { ColumnFamilyData* cfd; if (column_family == nullptr) { diff --git a/db/version_set.cc b/db/version_set.cc index cd79cc205..660b46985 100644 --- a/db/version_set.cc +++ b/db/version_set.cc @@ -3390,7 +3390,7 @@ const char* VersionStorageInfo::LevelFileSummary(FileSummaryStorage* scratch, return scratch->buffer; } -int64_t VersionStorageInfo::MaxNextLevelOverlappingBytes() { +uint64_t VersionStorageInfo::MaxNextLevelOverlappingBytes() { uint64_t result = 0; std::vector overlaps; for (int level = 1; level < num_levels() - 1; level++) { diff --git a/db/version_set.h b/db/version_set.h index c9f0e160f..22c0f4a97 100644 --- a/db/version_set.h +++ b/db/version_set.h @@ -447,7 +447,7 @@ class VersionStorageInfo { // Return the maximum overlapping data (in bytes) at next level for any // file at a level >= 1. - int64_t MaxNextLevelOverlappingBytes(); + uint64_t MaxNextLevelOverlappingBytes(); // Return a human readable string that describes this version's contents. std::string DebugString(bool hex = false) const;