Skip to content

Commit 0cf9b66

Browse files
committed
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.
1 parent 51a2bc4 commit 0cf9b66

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

tests/merge/trees/renames.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -307,7 +307,7 @@ void test_merge_trees_renames__cache_recomputation(void)
307307
*/
308308
cl_git_pass(git_treebuilder_new(&builder, repo, NULL));
309309
for (i = 0; i < 1000; i++) {
310-
cl_git_pass(git_buf_printf(&path, "%"PRIuMAX".txt", i));
310+
cl_git_pass(git_buf_printf(&path, "%"PRIuZ".txt", i));
311311
cl_git_pass(git_treebuilder_insert(NULL, builder, path.ptr, &blob, GIT_FILEMODE_BLOB));
312312
git_buf_clear(&path);
313313
}

0 commit comments

Comments
 (0)