diff options
| author | Matthew Plough <matt.plough@gmail.com> | 2015-06-30 19:00:41 -0400 |
|---|---|---|
| committer | Carlos MartÃn Nieto <cmn@dwim.me> | 2015-07-12 19:55:19 +0200 |
| commit | 768f8be31c3fac1b0ed8f4d49cf7176a30586443 (patch) | |
| tree | 93bce70b7e1e0417bd6f843e3ae2eea4d28da0ec /src/rebase.c | |
| parent | 9126ccac969a8da85992f5e3a67b292e59d4d7d0 (diff) | |
| download | libgit2-768f8be31c3fac1b0ed8f4d49cf7176a30586443.tar.gz | |
Fix #3094 - improve use of portable size_t/ssize_t format specifiers.
The header src/cc-compat.h defines portable format specifiers PRIuZ, PRIdZ, and PRIxZ. The original report highlighted the need to use these specifiers in examples/network/fetch.c. For this commit, I checked all C source and header files not in deps/ and transitioned to the appropriate format specifier where appropriate.
Diffstat (limited to 'src/rebase.c')
| -rw-r--r-- | src/rebase.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/rebase.c b/src/rebase.c index 8da7b4f7f..17536c030 100644 --- a/src/rebase.c +++ b/src/rebase.c @@ -436,7 +436,7 @@ static int rebase_setupfiles_merge(git_rebase *rebase) size_t i; int error = 0; - if ((error = rebase_setupfile(rebase, END_FILE, -1, "%d\n", git_array_size(rebase->operations))) < 0 || + if ((error = rebase_setupfile(rebase, END_FILE, -1, "%" PRIuZ "\n", git_array_size(rebase->operations))) < 0 || (error = rebase_setupfile(rebase, ONTO_NAME_FILE, -1, "%s\n", rebase->onto_name)) < 0) goto done; @@ -789,7 +789,7 @@ static int rebase_next_merge( normalize_checkout_options_for_apply(&checkout_opts, rebase, current_commit); if ((error = git_indexwriter_init_for_operation(&indexwriter, rebase->repo, &checkout_opts.checkout_strategy)) < 0 || - (error = rebase_setupfile(rebase, MSGNUM_FILE, -1, "%d\n", rebase->current+1)) < 0 || + (error = rebase_setupfile(rebase, MSGNUM_FILE, -1, "%" PRIuZ "\n", rebase->current+1)) < 0 || (error = rebase_setupfile(rebase, CURRENT_FILE, -1, "%.*s\n", GIT_OID_HEXSZ, current_idstr)) < 0 || (error = git_merge_trees(&index, rebase->repo, parent_tree, head_tree, current_tree, NULL)) < 0 || (error = git_merge__check_result(rebase->repo, index)) < 0 || |
