Skip to content

Commit

Permalink
Remove unused variables in faiss/utils/hamming.cpp
Browse files Browse the repository at this point in the history
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: danzimm

Differential Revision: D52847958

fbshipit-source-id: b3f98d8e0e4fd0e13191f0c0d907edd7c0e78db0
  • Loading branch information
r-barnes authored and facebook-github-bot committed Jan 18, 2024
1 parent 739ce13 commit 5e3eae4
Showing 1 changed file with 0 additions and 2 deletions.
2 changes: 0 additions & 2 deletions faiss/utils/hamming.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,6 @@
#include <faiss/utils/approx_topk_hamming/approx_topk_hamming.h>
#include <faiss/utils/utils.h>

static const size_t BLOCKSIZE_QUERY = 8192;

namespace faiss {

size_t hamming_batch_size = 65536;
Expand Down

0 comments on commit 5e3eae4

Please sign in to comment.