Skip to content

Commit

Permalink
table/block_based_table_builder.cc: intentional fallthrough - comment…
Browse files Browse the repository at this point in the history
… to match gcc pattern

Summary:
The gcc-7 code for parsing comments (libcpp/lex.c) didn't match
the intentional fallthough in this comment.

table/block_based_table_builder.cc: In member function 'void rocksdb::BlockBasedTableBuilder::WriteRawBlock(const rocksdb::Slice&, rocksdb::CompressionType, rocksdb::BlockHandle*)':
table/block_based_table_builder.cc:754:22: error: this statement may fall through [-Werror=implicit-fallthrough=]
         assert(false);
                      ^
table/block_based_table_builder.cc:756:7: note: here
       case kCRC32c: {
       ^~~~
cc1plus: all warnings being treated as errors
Closes facebook#1661

Differential Revision: D4318817

Pulled By: yiwu-arbug

fbshipit-source-id: e67d171
  • Loading branch information
grooverdan authored and Facebook Github Bot committed Dec 13, 2016
1 parent 36d42e6 commit 5334d8b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion table/block_based_table_builder.cc
Original file line number Diff line number Diff line change
Expand Up @@ -752,7 +752,7 @@ void BlockBasedTableBuilder::WriteRawBlock(const Slice& block_contents,
case kNoChecksum:
// we don't support no checksum yet
assert(false);
// intentional fallthrough in release binary
// intentional fallthrough
case kCRC32c: {
auto crc = crc32c::Value(block_contents.data(), block_contents.size());
crc = crc32c::Extend(crc, trailer, 1); // Extend to cover block type
Expand Down

0 comments on commit 5334d8b

Please sign in to comment.