Skip to content

Commit

Permalink
Remove unused exception parameter from openr/kvstore/tests/KvStoreTes…
Browse files Browse the repository at this point in the history
…t.cpp

Summary:
`-Wunused-exception-parameter` has identified an unused exception parameter. This diff removes it.

This:
```
try {
    ...
} catch (exception& e) {
    // no use of e
}
```
should instead be written as
```
} catch (exception&) {
```

If the code compiles, this is safe to land.

Reviewed By: TangoRoxy

Differential Revision: D52957649

fbshipit-source-id: 8a79edf738e10df3ad1c080044c5b6e986845674
  • Loading branch information
r-barnes authored and facebook-github-bot committed Jan 23, 2024
1 parent 53dbe6c commit 6d4ef98
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions openr/kvstore/tests/KvStoreTest.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -237,7 +237,7 @@ TEST_F(KvStoreTestFixture, DumpKeysWithPrefix) {
.get()
->begin();
maybeKeyMap = *pub.keyVals();
} catch (const std::exception& ex) {
} catch (const std::exception&) {
maybeKeyMap = std::nullopt;
}
EXPECT_TRUE(maybeKeyMap.has_value());
Expand Down Expand Up @@ -267,7 +267,7 @@ TEST_F(KvStoreTestFixture, DumpKeysWithPrefix) {
.get()
->begin();
maybeKeysAfterInsert = *pub.keyVals();
} catch (const std::exception& ex) {
} catch (const std::exception&) {
maybeKeysAfterInsert = std::nullopt;
}
EXPECT_TRUE(maybeKeysAfterInsert.has_value());
Expand All @@ -289,7 +289,7 @@ TEST_F(KvStoreTestFixture, DumpKeysWithPrefix) {
.get()
->begin();
maybeKeysAfterInsert = *pub.keyVals();
} catch (const std::exception& ex) {
} catch (const std::exception&) {
maybeKeysAfterInsert = std::nullopt;
}
EXPECT_TRUE(maybeKeysAfterInsert.has_value());
Expand Down Expand Up @@ -328,7 +328,7 @@ CO_TEST_F(KvStoreTestFixture, CoDumpKeysWithPrefix) {
.get()
->begin();
maybeKeyMap = *pub.keyVals();
} catch (const std::exception& ex) {
} catch (const std::exception&) {
maybeKeyMap = std::nullopt;
}
EXPECT_TRUE(maybeKeyMap.has_value());
Expand All @@ -355,7 +355,7 @@ CO_TEST_F(KvStoreTestFixture, CoDumpKeysWithPrefix) {
auto pub = co_await kvStore_->getKvStore()->co_dumpKvStoreKeys(
std::move(params), {kTestingAreaName.t});
maybeKeysAfterInsert = *pub->begin()->keyVals();
} catch (const std::exception& ex) {
} catch (const std::exception&) {
maybeKeysAfterInsert = std::nullopt;
}
EXPECT_TRUE(maybeKeysAfterInsert.has_value());
Expand All @@ -374,7 +374,7 @@ CO_TEST_F(KvStoreTestFixture, CoDumpKeysWithPrefix) {
auto pub = co_await kvStore_->getKvStore()->co_dumpKvStoreKeys(
std::move(params), {kTestingAreaName.t});
maybeKeysAfterInsert = *pub->begin()->keyVals();
} catch (const std::exception& ex) {
} catch (const std::exception&) {
maybeKeysAfterInsert = std::nullopt;
}
EXPECT_TRUE(maybeKeysAfterInsert.has_value());
Expand Down

0 comments on commit 6d4ef98

Please sign in to comment.