From 40dfa260497c9f482c5dd3a2eb4c362914edeb9f Mon Sep 17 00:00:00 2001 From: iseki Date: Tue, 14 Jun 2022 21:32:10 -0700 Subject: [PATCH] Fix C4702 on windows (#10146) Summary: This code is unreachable when `ROCKSDB_LITE` not defined. And it cause build fail on my environment VS2019 16.11.15. ``` -- Selecting Windows SDK version 10.0.19041.0 to target Windows 10.0.19044. -- The CXX compiler identification is MSVC 19.29.30145.0 -- The C compiler identification is MSVC 19.29.30145.0 -- The ASM compiler identification is MSVC ``` Pull Request resolved: https://github.com/facebook/rocksdb/pull/10146 Reviewed By: akankshamahajan15 Differential Revision: D37112916 Pulled By: ajkr fbshipit-source-id: e0b2bf3055d6fac1b3fb40b9f02c4cbae3f82757 --- db/db_impl/db_impl.cc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/db/db_impl/db_impl.cc b/db/db_impl/db_impl.cc index 298adaf04..7c0f6dbc1 100644 --- a/db/db_impl/db_impl.cc +++ b/db/db_impl/db_impl.cc @@ -812,8 +812,9 @@ Status DBImpl::StartPeriodicWorkScheduler() { return periodic_work_scheduler_->Register( this, mutable_db_options_.stats_dump_period_sec, mutable_db_options_.stats_persist_period_sec); -#endif // !ROCKSDB_LITE +#else return Status::OK(); +#endif // !ROCKSDB_LITE } // esitmate the total size of stats_history_