Fix unused variable compilation error (#4041)

Summary: Pull Request resolved: https://github.com/facebookresearch/faiss/pull/4041

Reviewed By: junjieqi

Differential Revision: D66477560

fbshipit-source-id: d2ee25424a902744910d3df77bd73b505d131618
test_cuvs_conda_ci
Amir Sadoughi 2024-11-26 07:47:40 -08:00 committed by Facebook GitHub Bot
parent 37f52dc9d2
commit 697b6ddf55
1 changed files with 1 additions and 1 deletions

View File

@ -50,7 +50,7 @@ float* fvecs_read(const char* fname, size_t* d_out, size_t* n_out) {
*d_out = d;
*n_out = n;
float* x = new float[n * (d + 1)];
size_t nr = fread(x, sizeof(float), n * (d + 1), f);
size_t nr __attribute__((unused)) = fread(x, sizeof(float), n * (d + 1), f);
assert(nr == n * (d + 1) || !"could not read whole file");
// shift array to remove row headers