Skip to content

Commit

Permalink
Merge pull request #471 from ttsugriy/warnings
Browse files Browse the repository at this point in the history
Fix build warnings.
  • Loading branch information
yurymalkov authored Jun 20, 2023
2 parents b977d25 + 47c0a32 commit 802a0ec
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
8 changes: 4 additions & 4 deletions tests/cpp/sift_1b.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -250,11 +250,11 @@ void sift_test1B() {
size_t vecdim = 128;
char path_index[1024];
char path_gt[1024];
char *path_q = "../bigann/bigann_query.bvecs";
char *path_data = "../bigann/bigann_base.bvecs";
sprintf(path_index, "sift1b_%dm_ef_%d_M_%d.bin", subset_size_milllions, efConstruction, M);
const char *path_q = "../bigann/bigann_query.bvecs";
const char *path_data = "../bigann/bigann_base.bvecs";
snprintf(path_index, sizeof(path_index), "sift1b_%dm_ef_%d_M_%d.bin", subset_size_milllions, efConstruction, M);

sprintf(path_gt, "../bigann/gnd/idx_%dM.ivecs", subset_size_milllions);
snprintf(path_gt, sizeof(path_gt), "../bigann/gnd/idx_%dM.ivecs", subset_size_milllions);

unsigned char *massb = new unsigned char[vecdim];

Expand Down
2 changes: 1 addition & 1 deletion tests/cpp/updates_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -239,7 +239,7 @@ int main(int argc, char **argv) {
for (int b = 1; b < dummy_data_multiplier; b++) {
std::cout << "Update iteration " << b << "\n";
char cpath[1024];
sprintf(cpath, "batch_dummy_%02d.bin", b);
snprintf(cpath, sizeof(cpath), "batch_dummy_%02d.bin", b);
std::vector<float> dummy_batchb = load_batch<float>(path + cpath, N * d);

ParallelFor(0, N, num_threads, [&](size_t i, size_t threadId) {
Expand Down

0 comments on commit 802a0ec

Please sign in to comment.