Fix build error: variable 'base_level' may be uninitialized (#11435)

Summary:
Fix build error: variable 'base_level' may be uninitialized
```
 db_impl_compaction_flush.cc:1195:21: error: variable 'base_level' may be uninitialized when used here [-Werror,-Wconditional-uninitialized]
            level = base_level;
```
                    ^~~~~~~~~~

Pull Request resolved: https://github.com/facebook/rocksdb/pull/11435

Test Plan: CircleCI jobs

Reviewed By: cbi42

Differential Revision: D45708176

Pulled By: akankshamahajan15

fbshipit-source-id: 851b1205b22b63d728495e5735fa91b0ad8e012b
This commit is contained in:
akankshamahajan 2023-05-09 15:43:43 -07:00 committed by Facebook GitHub Bot
parent 8f763bdeab
commit 6ba4717f35
1 changed files with 1 additions and 1 deletions

View File

@ -1170,7 +1170,7 @@ Status DBImpl::CompactRangeInternal(const CompactRangeOptions& options,
// at L1 (or LBase), if applicable.
int level = first_overlapped_level;
final_output_level = level;
int output_level, base_level;
int output_level = 0, base_level = 0;
while (level < max_overlapped_level || level == 0) {
output_level = level + 1;
if (cfd->ioptions()->level_compaction_dynamic_level_bytes &&