Skip to content

Commit e4b0ee7

Browse files
r-barnesfacebook-github-bot
authored andcommitted
Fix unreachable-break issue in ../xplat/models/cache/DefaultDiskCache.cpp +5
Summary: 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. Such statements once existed to prevent accidental fallthroughs in switch statements. However, this is no longer necessary in C++17 because `[[fallthrough]]` is used to indicate intentional fallthroughs and we raise compilation errors for fallthroughs that are not annotated with `[[fallthrough]]` using `-Wimplicit-fallthrough`. For questions/comments, contact r-barnes. - If you approve of this diff, please use the "Accept & Ship" button :-) Reviewed By: dtolnay Differential Revision: D78275960 fbshipit-source-id: c22ddd30f7314ec5a030e8583a2234aba826e15a
1 parent 9737575 commit e4b0ee7

2 files changed

Lines changed: 0 additions & 2 deletions

File tree

impl/ocean/devices/SceneTracker6DOF.cpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,6 @@ std::string SceneTracker6DOF::SceneElementRoom::RoomObject::translateObjectType(
1919
{
2020
case OT_UNDEFINED:
2121
return "UNDEFINED";
22-
break;
2322

2423
case OT_PLANAR:
2524
return "PLANAR";

impl/ocean/test/testcv/testdetector/testqrcodes/TestMicroQRCodeDecoder.cpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -178,7 +178,6 @@ bool TestMicroQRCodeDecoder::testMicroQRCodeDecoding(const double testDuration)
178178
ocean_assert(false && "Never be here");
179179
allSucceeded = false;
180180
return false;
181-
break;
182181
}
183182

184183
allSucceeded = allSucceeded && qrcodeGenerated;

0 commit comments

Comments
 (0)