Skip to content

Commit feb01ba

Browse files
r-barnesmeta-codesync[bot]
authored andcommitted
fix: Fix unreachable-break issue in velox (facebookincubator#15783)
Summary: Pull Request resolved: facebookincubator#15783 LLVM has a warning `-Wunreachable-code-break` which identifies `break` statements that cannot be reached. These compromise readability, are misleading, and may identify bugs. This diff removes such statements. For questions/comments, contact r-barnes. - If you approve of this diff, please use the "Accept & Ship" button :-) Reviewed By: Yuhta, meyering Differential Revision: D89225727 fbshipit-source-id: 0221e513bba95ff7842809ef9f0a318f35b0d591
1 parent e63868a commit feb01ba

File tree

4 files changed

+0
-15
lines changed

4 files changed

+0
-15
lines changed

velox/dwio/parquet/reader/Metadata.cpp

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -156,22 +156,16 @@ common::CompressionKind thriftCodecToCompressionKind(
156156
switch (codec) {
157157
case thrift::CompressionCodec::UNCOMPRESSED:
158158
return common::CompressionKind::CompressionKind_NONE;
159-
break;
160159
case thrift::CompressionCodec::SNAPPY:
161160
return common::CompressionKind::CompressionKind_SNAPPY;
162-
break;
163161
case thrift::CompressionCodec::GZIP:
164162
return common::CompressionKind::CompressionKind_GZIP;
165-
break;
166163
case thrift::CompressionCodec::LZO:
167164
return common::CompressionKind::CompressionKind_LZO;
168-
break;
169165
case thrift::CompressionCodec::LZ4:
170166
return common::CompressionKind::CompressionKind_LZ4;
171-
break;
172167
case thrift::CompressionCodec::ZSTD:
173168
return common::CompressionKind::CompressionKind_ZSTD;
174-
break;
175169
case thrift::CompressionCodec::LZ4_RAW:
176170
return common::CompressionKind::CompressionKind_LZ4;
177171
default:

velox/row/CompactRow.cpp

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1145,16 +1145,12 @@ VectorPtr deserialize(
11451145
case TypeKind::VARCHAR:
11461146
case TypeKind::VARBINARY:
11471147
return deserializeStrings(type, data, nulls, offsets, pool);
1148-
break;
11491148
case TypeKind::ARRAY:
11501149
return deserializeArrays(type, data, nulls, offsets, pool);
1151-
break;
11521150
case TypeKind::MAP:
11531151
return deserializeMaps(type, data, nulls, offsets, pool);
1154-
break;
11551152
case TypeKind::ROW:
11561153
return deserializeRows(type, data, nulls, offsets, pool);
1157-
break;
11581154
default:
11591155
VELOX_UNREACHABLE("{}", type->toString());
11601156
}

velox/row/UnsafeRowFast.cpp

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1023,16 +1023,12 @@ VectorPtr deserialize(
10231023
case TypeKind::VARCHAR:
10241024
case TypeKind::VARBINARY:
10251025
return deserializeStrings(type, data, nulls, offsets, pool);
1026-
break;
10271026
case TypeKind::ARRAY:
10281027
return deserializeArrays(type, data, nulls, pool);
1029-
break;
10301028
case TypeKind::MAP:
10311029
return deserializeMaps(type, data, nulls, pool);
1032-
break;
10331030
case TypeKind::ROW:
10341031
return deserializeRows(type, data, nulls, offsets, pool);
1035-
break;
10361032
default:
10371033
VELOX_UNREACHABLE("{}", type->toString());
10381034
}

velox/tpcds/gen/dsdgen/join.cpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,6 @@ static ds_key_t date_join(
106106
genrand_integer(
107107
&nTemp, DIST_UNIFORM, nMin * 2, nMax * 2, 0, from_col, dsdGenContext);
108108
return (join_count + nTemp);
109-
break;
110109
case WEB_SITE:
111110
case WEB_PAGE:
112111
return (web_join(from_col, join_count, dsdGenContext));

0 commit comments

Comments
 (0)