Skip to content

Commit 99c0e2b

Browse files
r-barnesfacebook-github-bot
authored andcommitted
Remove unused variables in faiss/utils/sorting.cpp
Summary: LLVM-15 has a warning `-Wunused-but-set-variable` which we treat as an error because it's so often diagnostic of a code issue. Unused variables can compromise readability or, worse, performance. This diff either (a) removes an unused variable and, possibly, it's associated code, or (b) qualifies the variable with `[[maybe_unused]]`, mostly in cases where the variable _is_ used, but, eg, in an `assert` statement that isn't present in production code. - If you approve of this diff, please use the "Accept & Ship" button :-) Reviewed By: bunnypak, dmm-fb Differential Revision: D53011673 fbshipit-source-id: 011204944fdc48627a34e1358833fc525dcc2c28
1 parent e8494f6 commit 99c0e2b

File tree

1 file changed

+0
-1
lines changed

1 file changed

+0
-1
lines changed

faiss/utils/sorting.cpp

-1
Original file line numberDiff line numberDiff line change
@@ -791,7 +791,6 @@ void hashtable_int64_to_int64_lookup(
791791
std::vector<int64_t> hk(n), bucket_no(n);
792792
int64_t mask = capacity - 1;
793793
int log2_nbucket = log2_capacity_to_log2_nbucket(log2_capacity);
794-
size_t nbucket = (size_t)1 << log2_nbucket;
795794

796795
#pragma omp parallel for
797796
for (int64_t i = 0; i < n; i++) {

0 commit comments

Comments
 (0)