Skip to content

Commit

Permalink
Remove unused exception parameter from cachelib/allocator/tests/TestB…
Browse files Browse the repository at this point in the history
…ase-inl.h

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: vrishal

Differential Revision: D52957797

fbshipit-source-id: 482d1b631904ce4bc8d72849f92e42992f80bb4a
  • Loading branch information
r-barnes authored and facebook-github-bot committed Jan 23, 2024
1 parent c869b6d commit c2bef95
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion cachelib/allocator/tests/TestBase-inl.h
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ std::vector<uint32_t> AllocatorTest<AllocatorT>::getValidAllocSizes(
// size is a valid allocation size. If not, try again.
try {
util::allocateAccessible(alloc, poolId, key, size);
} catch (const std::invalid_argument& e) {
} catch (const std::invalid_argument&) {
continue;
}
sizes.push_back(size);
Expand Down

0 comments on commit c2bef95

Please sign in to comment.