summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/cache.c8
-rw-r--r--src/checkout.c4
-rw-r--r--src/merge.c6
-rw-r--r--src/rebase.c4
-rw-r--r--src/stash.c2
-rw-r--r--src/transports/http.c2
-rw-r--r--src/transports/smart_pkt.c2
7 files changed, 14 insertions, 14 deletions
diff --git a/src/cache.c b/src/cache.c
index 2f3ad1563..ca5173c0d 100644
--- a/src/cache.c
+++ b/src/cache.c
@@ -50,16 +50,16 @@ void git_cache_dump_stats(git_cache *cache)
if (kh_size(cache->map) == 0)
return;
- printf("Cache %p: %d items cached, %d bytes\n",
- cache, kh_size(cache->map), (int)cache->used_memory);
+ printf("Cache %p: %d items cached, %"PRIdZ" bytes\n",
+ cache, kh_size(cache->map), cache->used_memory);
kh_foreach_value(cache->map, object, {
char oid_str[9];
- printf(" %s%c %s (%d)\n",
+ printf(" %s%c %s (%"PRIuZ")\n",
git_object_type2string(object->type),
object->flags == GIT_CACHE_STORE_PARSED ? '*' : ' ',
git_oid_tostr(oid_str, sizeof(oid_str), &object->oid),
- (int)object->size
+ object->size
);
});
}
diff --git a/src/checkout.c b/src/checkout.c
index a94d509d3..4b3acbcce 100644
--- a/src/checkout.c
+++ b/src/checkout.c
@@ -1299,8 +1299,8 @@ static int checkout_get_actions(
if (counts[CHECKOUT_ACTION__CONFLICT] > 0 &&
(data->strategy & GIT_CHECKOUT_ALLOW_CONFLICTS) == 0)
{
- giterr_set(GITERR_CHECKOUT, "%d %s checkout",
- (int)counts[CHECKOUT_ACTION__CONFLICT],
+ giterr_set(GITERR_CHECKOUT, "%"PRIuZ" %s checkout",
+ counts[CHECKOUT_ACTION__CONFLICT],
counts[CHECKOUT_ACTION__CONFLICT] == 1 ?
"conflict prevents" : "conflicts prevent");
error = GIT_ECONFLICT;
diff --git a/src/merge.c b/src/merge.c
index 9d6252ea8..863ac8f2d 100644
--- a/src/merge.c
+++ b/src/merge.c
@@ -79,7 +79,7 @@ int merge_bases_many(git_commit_list **out, git_revwalk **walk_out, git_reposito
unsigned int i;
if (length < 2) {
- giterr_set(GITERR_INVALID, "At least two commits are required to find an ancestor. Provided 'length' was %u.", length);
+ giterr_set(GITERR_INVALID, "At least two commits are required to find an ancestor. Provided 'length' was %" PRIuZ ".", length);
return -1;
}
@@ -185,7 +185,7 @@ int git_merge_base_octopus(git_oid *out, git_repository *repo, size_t length, co
assert(out && repo && input_array);
if (length < 2) {
- giterr_set(GITERR_INVALID, "At least two commits are required to find an ancestor. Provided 'length' was %u.", length);
+ giterr_set(GITERR_INVALID, "At least two commits are required to find an ancestor. Provided 'length' was %" PRIuZ ".", length);
return -1;
}
@@ -2451,7 +2451,7 @@ int git_merge__check_result(git_repository *repo, git_index *index_new)
goto done;
if ((conflicts = index_conflicts + wd_conflicts) > 0) {
- giterr_set(GITERR_MERGE, "%d uncommitted change%s would be overwritten by merge",
+ giterr_set(GITERR_MERGE, "%" PRIuZ " uncommitted change%s would be overwritten by merge",
conflicts, (conflicts != 1) ? "s" : "");
error = GIT_ECONFLICT;
}
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 ||
diff --git a/src/stash.c b/src/stash.c
index acf89442a..fcb1112ac 100644
--- a/src/stash.c
+++ b/src/stash.c
@@ -770,7 +770,7 @@ static int ensure_clean_index(git_repository *repo, git_index *index)
goto done;
if (git_diff_num_deltas(index_diff) > 0) {
- giterr_set(GITERR_STASH, "%d uncommitted changes exist in the index",
+ giterr_set(GITERR_STASH, "%" PRIuZ " uncommitted changes exist in the index",
git_diff_num_deltas(index_diff));
error = GIT_EUNCOMMITTED;
}
diff --git a/src/transports/http.c b/src/transports/http.c
index dd4426475..1ed292be5 100644
--- a/src/transports/http.c
+++ b/src/transports/http.c
@@ -511,7 +511,7 @@ static int write_chunk(git_stream *io, const char *buffer, size_t len)
git_buf buf = GIT_BUF_INIT;
/* Chunk header */
- git_buf_printf(&buf, "%X\r\n", (unsigned)len);
+ git_buf_printf(&buf, "%" PRIxZ "\r\n", len);
if (git_buf_oom(&buf))
return -1;
diff --git a/src/transports/smart_pkt.c b/src/transports/smart_pkt.c
index d214c9fa5..9ccbd8085 100644
--- a/src/transports/smart_pkt.c
+++ b/src/transports/smart_pkt.c
@@ -523,7 +523,7 @@ static int buffer_want_with_caps(const git_remote_head *head, transport_smart_ca
if (len > 0xffff) {
giterr_set(GITERR_NET,
- "Tried to produce packet with invalid length %d", len);
+ "Tried to produce packet with invalid length %" PRIuZ, len);
return -1;
}