mirror of
https://git.proxmox.com/git/libgit2
synced 2025-08-07 17:27:40 +00:00
Fix up more Win64 compile warnings
This commit is contained in:
parent
cc5bf359a6
commit
7c411fd9b2
10
src/refs.c
10
src/refs.c
@ -1608,12 +1608,12 @@ static int ensure_segment_validity(const char *name)
|
|||||||
prev = *current;
|
prev = *current;
|
||||||
}
|
}
|
||||||
|
|
||||||
return current - name;
|
return (int)(current - name);
|
||||||
}
|
}
|
||||||
|
|
||||||
static bool is_all_caps_and_underscore(const char *name, int len)
|
static bool is_all_caps_and_underscore(const char *name, size_t len)
|
||||||
{
|
{
|
||||||
int i;
|
size_t i;
|
||||||
char c;
|
char c;
|
||||||
|
|
||||||
assert(name && len > 0);
|
assert(name && len > 0);
|
||||||
@ -1665,7 +1665,7 @@ int git_reference__normalize_name(
|
|||||||
|
|
||||||
if (segment_len > 0) {
|
if (segment_len > 0) {
|
||||||
if (normalize) {
|
if (normalize) {
|
||||||
int cur_len = git_buf_len(buf);
|
size_t cur_len = git_buf_len(buf);
|
||||||
|
|
||||||
git_buf_joinpath(buf, git_buf_cstr(buf), current);
|
git_buf_joinpath(buf, git_buf_cstr(buf), current);
|
||||||
git_buf_truncate(buf,
|
git_buf_truncate(buf,
|
||||||
@ -1704,7 +1704,7 @@ int git_reference__normalize_name(
|
|||||||
goto cleanup;
|
goto cleanup;
|
||||||
|
|
||||||
if ((segments_count == 1 ) &&
|
if ((segments_count == 1 ) &&
|
||||||
!(is_all_caps_and_underscore(name, segment_len) ||
|
!(is_all_caps_and_underscore(name, (size_t)segment_len) ||
|
||||||
((flags & GIT_REF_FORMAT_REFSPEC_PATTERN) && !strcmp("*", name))))
|
((flags & GIT_REF_FORMAT_REFSPEC_PATTERN) && !strcmp("*", name))))
|
||||||
goto cleanup;
|
goto cleanup;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user