Skip to content

Commit

Permalink
Remove unused variables in faiss/utils/hamming_distance/neon-inl.h
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: palmje

Differential Revision: D53779537

fbshipit-source-id: 698cdc6720c10d219e56ecd2aad8f4cbe636c639
  • Loading branch information
r-barnes authored and facebook-github-bot committed Feb 15, 2024
1 parent c0624d2 commit 6d00c41
Showing 1 changed file with 0 additions and 1 deletion.
1 change: 0 additions & 1 deletion faiss/utils/hamming_distance/neon-inl.h
Original file line number Diff line number Diff line change
Expand Up @@ -260,7 +260,6 @@ struct HammingComputer32 {
}

inline int hamming(const uint8_t* b8) const {
const uint64_t* b = (uint64_t*)b8;
uint8x16_t b0 = vld1q_u8(b8);
uint8x16_t b1 = vld1q_u8(b8 + 16);

Expand Down

0 comments on commit 6d00c41

Please sign in to comment.