Skip to content

Commit 00f8016

Browse files
siyingfacebook-github-bot
authored andcommitted
Fix clang anaylze warning caused by #6262 (#6641)
Summary: #6262 causes CLANG analyze to complain. Add assertion to suppress the warning. Pull Request resolved: #6641 Test Plan: Run "clang analyze" and make sure it passes. Reviewed By: anand1976 Differential Revision: D20841722 fbshipit-source-id: 5fa6e0c5cfe7a822214c9b898a408df59d4fd2cd
1 parent e60ea7f commit 00f8016

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

table/block_based/block_based_table_builder.cc

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -781,10 +781,12 @@ void BlockBasedTableBuilder::Flush() {
781781
if (r->data_block.empty()) return;
782782
if (r->compression_opts.parallel_threads > 1 &&
783783
r->state == Rep::State::kUnbuffered) {
784-
ParallelCompressionRep::BlockRep* block_rep;
784+
ParallelCompressionRep::BlockRep* block_rep = nullptr;
785785
r->pc_rep->block_rep_pool.pop(block_rep);
786+
assert(block_rep != nullptr);
786787

787788
r->data_block.Finish();
789+
assert(block_rep->data);
788790
r->data_block.SwapAndReset(*(block_rep->data));
789791

790792
block_rep->contents = *(block_rep->data);

0 commit comments

Comments
 (0)