From 93ecbf6c9849b4fc581ed595140b663a7c785080 Mon Sep 17 00:00:00 2001 From: Jeremie Fraeys Date: Mon, 23 Mar 2026 15:23:59 -0400 Subject: [PATCH] fix(native/tests): correct printf format specifier for int64_t Fix C++ printf format specifier for int64_t (milliseconds count): - Change %ld to %lld for duration_cast.count() - Resolves compiler warnings on platforms where long != long long --- native/tests/test_dataset_hash.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/native/tests/test_dataset_hash.cpp b/native/tests/test_dataset_hash.cpp index 0f2256b..0a16506 100644 --- a/native/tests/test_dataset_hash.cpp +++ b/native/tests/test_dataset_hash.cpp @@ -248,8 +248,8 @@ int test_performance() { auto create_time = duration_cast(create_end - start); auto hash_time = duration_cast(hash_end - create_end); - printf(" Created %d files in %ld ms\n", num_files, create_time.count()); - printf(" Hashed %d files in %ld ms\n", num_files, hash_time.count()); + printf(" Created %d files in %lld ms\n", num_files, create_time.count()); + printf(" Hashed %d files in %lld ms\n", num_files, hash_time.count()); printf(" Throughput: %.1f files/sec\n", num_files * 1000.0 / hash_time.count()); fh_free_string(hash);