mirror of
https://git.proxmox.com/git/libgit2
synced 2025-06-21 20:34:17 +00:00
patch: drop some warnings
This commit is contained in:
parent
040ec883a4
commit
f941f035ae
@ -467,8 +467,7 @@ static int format_binary(
|
|||||||
|
|
||||||
static int diff_print_patch_file_binary_noshow(
|
static int diff_print_patch_file_binary_noshow(
|
||||||
diff_print_info *pi, git_diff_delta *delta,
|
diff_print_info *pi, git_diff_delta *delta,
|
||||||
const char *old_pfx, const char *new_pfx,
|
const char *old_pfx, const char *new_pfx)
|
||||||
const git_diff_binary *binary)
|
|
||||||
{
|
{
|
||||||
git_buf old_path = GIT_BUF_INIT, new_path = GIT_BUF_INIT;
|
git_buf old_path = GIT_BUF_INIT, new_path = GIT_BUF_INIT;
|
||||||
int error;
|
int error;
|
||||||
@ -502,7 +501,7 @@ static int diff_print_patch_file_binary(
|
|||||||
|
|
||||||
if ((pi->flags & GIT_DIFF_SHOW_BINARY) == 0)
|
if ((pi->flags & GIT_DIFF_SHOW_BINARY) == 0)
|
||||||
return diff_print_patch_file_binary_noshow(
|
return diff_print_patch_file_binary_noshow(
|
||||||
pi, delta, old_pfx, new_pfx, binary);
|
pi, delta, old_pfx, new_pfx);
|
||||||
|
|
||||||
if (binary->new_file.datalen == 0 && binary->old_file.datalen == 0)
|
if (binary->new_file.datalen == 0 && binary->old_file.datalen == 0)
|
||||||
return 0;
|
return 0;
|
||||||
@ -521,7 +520,7 @@ static int diff_print_patch_file_binary(
|
|||||||
git_buf_truncate(pi->buf, pre_binary_size);
|
git_buf_truncate(pi->buf, pre_binary_size);
|
||||||
|
|
||||||
return diff_print_patch_file_binary_noshow(
|
return diff_print_patch_file_binary_noshow(
|
||||||
pi, delta, old_pfx, new_pfx, binary);
|
pi, delta, old_pfx, new_pfx);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -184,7 +184,7 @@ static int parse_header_mode(uint16_t *mode, patch_parse_ctx *ctx)
|
|||||||
|
|
||||||
static int parse_header_oid(
|
static int parse_header_oid(
|
||||||
git_oid *oid,
|
git_oid *oid,
|
||||||
size_t *oid_len,
|
int *oid_len,
|
||||||
patch_parse_ctx *ctx)
|
patch_parse_ctx *ctx)
|
||||||
{
|
{
|
||||||
size_t len;
|
size_t len;
|
||||||
@ -201,7 +201,7 @@ static int parse_header_oid(
|
|||||||
|
|
||||||
parse_advance_chars(ctx, len);
|
parse_advance_chars(ctx, len);
|
||||||
|
|
||||||
*oid_len = len;
|
*oid_len = (int)len;
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user