Skip to content

Commit b274cb4

Browse files
r-barnesfacebook-github-bot
authored andcommitted
Remove unused variables in faiss/IndexIVFFastScan.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: algoriddle Differential Revision: D52981034 fbshipit-source-id: 0315bb594a2dfaa059132b5f4e41855a4e15034b
1 parent e55a0ac commit b274cb4

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

faiss/IndexIVFFastScan.cpp

+1-2
Original file line numberDiff line numberDiff line change
@@ -858,7 +858,7 @@ void IndexIVFFastScan::search_implem_10(
858858

859859
bool single_LUT = !lookup_table_is_3d();
860860

861-
size_t ndis = 0, nlist_visited = 0;
861+
size_t ndis = 0;
862862
int qmap1[1];
863863

864864
handler.q_map = qmap1;
@@ -906,7 +906,6 @@ void IndexIVFFastScan::search_implem_10(
906906
handler,
907907
scaler);
908908

909-
nlist_visited++;
910909
ndis++;
911910
}
912911
}

0 commit comments

Comments
 (0)