Skip to content

Commit

Permalink
Fix unused variable compilation error (#4041)
Browse files Browse the repository at this point in the history
Summary: Pull Request resolved: #4041

Reviewed By: junjieqi

Differential Revision: D66477560

fbshipit-source-id: d2ee25424a902744910d3df77bd73b505d131618
  • Loading branch information
Amir Sadoughi authored and facebook-github-bot committed Nov 26, 2024
1 parent 37f52dc commit 697b6dd
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion demos/demo_sift1M.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 697b6dd

Please sign in to comment.