Skip to content

Commit 1b0d274

Browse files
r-barnesfacebook-github-bot
authored andcommitted
Remove unused variables in faiss/IndexIVF.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: palmje Differential Revision: D53779599 fbshipit-source-id: 7f872cecdff078681748d18dfdea78e361a9a72f
1 parent 53fc617 commit 1b0d274

File tree

1 file changed

+0
-1
lines changed

1 file changed

+0
-1
lines changed

faiss/IndexIVF.cpp

-1
Original file line numberDiff line numberDiff line change
@@ -668,7 +668,6 @@ void IndexIVF::search_preassigned(
668668
#pragma omp for schedule(dynamic)
669669
for (int64_t ij = 0; ij < n * nprobe; ij++) {
670670
size_t i = ij / nprobe;
671-
size_t j = ij % nprobe;
672671

673672
scanner->set_query(x + i * d);
674673
init_result(local_dis.data(), local_idx.data());

0 commit comments

Comments
 (0)