Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix build warnings. #471

Merged
merged 1 commit into from
Jun 20, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
[warnings] Fix build warnings.
  • Loading branch information
ttsugriy committed Jun 19, 2023
commit 47c0a32c901c6ecdca212df4ba52f4caef1bcf6a
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