Skip to content

Commit 049a2e0

Browse files
r-barnesfacebook-github-bot
authored andcommitted
Remove unused-but-set variables in telephoto/execution/Execution.cpp +5
Summary: This diff removes a variable that was set, but which was not used. LLVM-15 has a warning `-Wunused-but-set-variable` which we treat as an error because it's so often diagnostic of a code issue. Unused but set variables often indicate a programming mistake, but can also just be unnecessary cruft that harms readability and performance. Removing this variable will not change how your code works, but the unused variable may indicate your code isn't working the way you thought it was. If you feel the diff needs changes before landing, **please commandeer** and make appropriate changes: there are hundreds of these and responding to them individually is challenging. For questions/comments, contact r-barnes. - If you approve of this diff, please use the "Accept & Ship" button :-) Reviewed By: dtolnay Differential Revision: D79967971 fbshipit-source-id: 6e227b82a174f32b36d614c2c54fc87a9fd9418f
1 parent c05d2b8 commit 049a2e0

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

third-party/thrift/src/thrift/conformance/cpp2/AnyRefTest.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,9 +39,9 @@ TEST(AnyRefTest, DocExample1) {
3939

4040
TEST(AnyRefTest, DocExample2) {
4141
auto foo = [](any_ref in) {
42-
if (const auto* i = any_cast<const int>(&in)) {
42+
if (any_cast<const int>(&in)) {
4343
return 1;
44-
} else if (const auto* f = any_cast<const float>(&in)) {
44+
} else if (any_cast<const float>(&in)) {
4545
return 2;
4646
}
4747
return 3;

0 commit comments

Comments
 (0)