Skip to content

Commit

Permalink
Remove unused exception parameter from cachelib/shm/PosixShmSegment.cpp
Browse files Browse the repository at this point in the history
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: palmje

Differential Revision: D51785883

fbshipit-source-id: 2ae16231cc25686c92384dc4bf00191741079de5
  • Loading branch information
r-barnes authored and facebook-github-bot committed Dec 3, 2023
1 parent b6f1fc8 commit e8abfe7
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion cachelib/shm/PosixShmSegment.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -225,7 +225,7 @@ PosixShmSegment::~PosixShmSegment() {
// delete the reference mapping so the segment can be deleted if its
// marked to be.
deleteReferenceMapping();
} catch (const std::system_error& e) {
} catch (const std::system_error&) {
}

// need to close the fd without throwing any exceptions. so we call close
Expand Down

0 comments on commit e8abfe7

Please sign in to comment.