mirror of
https://git.proxmox.com/git/libgit2
synced 2025-05-30 22:24:56 +00:00
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.
This commit is contained in:
parent
f0ca00e013
commit
8d93a11cff
@ -1326,9 +1326,9 @@ static int git_odb_stream__invalid_length(
|
|||||||
{
|
{
|
||||||
giterr_set(GITERR_ODB,
|
giterr_set(GITERR_ODB,
|
||||||
"cannot %s - "
|
"cannot %s - "
|
||||||
"Invalid length. %"PRIuZ" was expected. The "
|
"Invalid length. %"PRIdZ" was expected. The "
|
||||||
"total size of the received chunks amounts to %"PRIuZ".",
|
"total size of the received chunks amounts to %"PRIdZ".",
|
||||||
action, stream->declared_size, stream->received_bytes);
|
action, stream->declared_size, stream->received_bytes);
|
||||||
|
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user