Skip to content

Commit

Permalink
Remove unused exception parameter from deeplearning/projects/flashlig…
Browse files Browse the repository at this point in the history
…ht/flashlight/fl/tensor/backend/af/mem/DefaultMemoryManager.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: dmm-fb

Differential Revision: D53780600

fbshipit-source-id: b5bc449f334424fe14b2922a5365978440a521c1
  • Loading branch information
r-barnes authored and facebook-github-bot committed Feb 15, 2024
1 parent 418396c commit 30c7e6c
Showing 1 changed file with 1 addition and 1 deletion.
Expand Up @@ -188,7 +188,7 @@ void* DefaultMemoryManager::alloc(
// Perform garbage collection if memory can not be allocated
try {
ptr = this->deviceInterface->nativeAlloc(allocBytes);
} catch (std::exception& ex) {
} catch (std::exception&) {
// FIXME: assume that the exception is due to out of memory, and don't
// continue propagating it
// If out of memory, run garbage collect and try again
Expand Down

0 comments on commit 30c7e6c

Please sign in to comment.