Skip to content

Commit

Permalink
Fix build error: variable 'base_level' may be uninitialized (#11435)
Browse files Browse the repository at this point in the history
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: #11435

Test Plan: CircleCI jobs

Reviewed By: cbi42

Differential Revision: D45708176

Pulled By: akankshamahajan15

fbshipit-source-id: 851b1205b22b63d728495e5735fa91b0ad8e012b
  • Loading branch information
akankshamahajan15 authored and facebook-github-bot committed May 9, 2023
1 parent 8f763bd commit 6ba4717
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion db/db_impl/db_impl_compaction_flush.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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 &&
Expand Down

0 comments on commit 6ba4717

Please sign in to comment.