Skip to content

Commit

Permalink
Remove unused exception parameter from files inc faiss/tests/test_app…
Browse files Browse the repository at this point in the history
…rox_topk.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: algoriddle

Differential Revision: D51977717

fbshipit-source-id: 47a308ff3570935829531663252409b4e0cfdec4
  • Loading branch information
r-barnes authored and facebook-github-bot committed Dec 8, 2023
1 parent 5b6c4b4 commit d2cb016
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion tests/test_approx_topk.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ void test_approx_topk(
k,
approxDistances.data(),
approxIndices.data());
} catch (const faiss::FaissException& ex) {
} catch (const faiss::FaissException&) {
//
if (verbose) {
printf("Skipping the case.\n");
Expand Down

0 comments on commit d2cb016

Please sign in to comment.