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
oxigraph-8.3.2
akankshamahajan 2 years ago committed by Facebook GitHub Bot
parent 8f763bdeab
commit 6ba4717f35
  1. 2
      db/db_impl/db_impl_compaction_flush.cc

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

Loading…
Cancel
Save