Commit 0cf9b666 by Patrick Steinhardt

tests: merge: fix printf formatter on 32 bit arches

We currently use `PRIuMAX` to print an integer of type `size_t` in
merge::trees::rename::cache_recomputation. While this works just fine on
64 bit arches, it doesn't on 32 bit ones. As a result, our nightly
builds on x86 and arm32 fail.

Fix the issue by using `PRIuZ` instead.
parent 51a2bc43
...@@ -307,7 +307,7 @@ void test_merge_trees_renames__cache_recomputation(void) ...@@ -307,7 +307,7 @@ void test_merge_trees_renames__cache_recomputation(void)
*/ */
cl_git_pass(git_treebuilder_new(&builder, repo, NULL)); cl_git_pass(git_treebuilder_new(&builder, repo, NULL));
for (i = 0; i < 1000; i++) { for (i = 0; i < 1000; i++) {
cl_git_pass(git_buf_printf(&path, "%"PRIuMAX".txt", i)); cl_git_pass(git_buf_printf(&path, "%"PRIuZ".txt", i));
cl_git_pass(git_treebuilder_insert(NULL, builder, path.ptr, &blob, GIT_FILEMODE_BLOB)); cl_git_pass(git_treebuilder_insert(NULL, builder, path.ptr, &blob, GIT_FILEMODE_BLOB));
git_buf_clear(&path); git_buf_clear(&path);
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment