summaryrefslogtreecommitdiff
path: root/src/odb.c
diff options
context:
space:
mode:
authorPatrick Steinhardt <ps@pks.im>2017-05-03 12:38:55 +0200
committerPatrick Steinhardt <ps@pks.im>2017-05-15 07:34:04 +0200
commit8d93a11cffa8199d212124401fdca64b5ae3bacc (patch)
treeadff296645dc96ba187155aa1b9dadd3eb0e4916 /src/odb.c
parentf0ca00e013885479228c4f076989566a2b77221b (diff)
downloadlibgit2-8d93a11cffa8199d212124401fdca64b5ae3bacc.tar.gz
odb: fix printf formatter for git_off_t
The fields `declared_size` and `received_bytes` of the `git_odb_stream` are both of type `git_off_t` which is defined as a signed integer. When passing these values to a printf-style string in `git_odb_stream__invalid_length`, though, we format these as PRIuZ, which is unsigned. Fix the issue by using PRIdZ instead, silencing warnings on macOS.
Diffstat (limited to 'src/odb.c')
-rw-r--r--src/odb.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/odb.c b/src/odb.c
index f28152bff..b66324f87 100644
--- a/src/odb.c
+++ b/src/odb.c
@@ -1326,9 +1326,9 @@ static int git_odb_stream__invalid_length(
{
giterr_set(GITERR_ODB,
"cannot %s - "
- "Invalid length. %"PRIuZ" was expected. The "
- "total size of the received chunks amounts to %"PRIuZ".",
- action, stream->declared_size, stream->received_bytes);
+ "Invalid length. %"PRIdZ" was expected. The "
+ "total size of the received chunks amounts to %"PRIdZ".",
+ action, stream->declared_size, stream->received_bytes);
return -1;
}