diff options
| author | Russell Belfer <rb@github.com> | 2012-10-01 12:32:55 -0700 |
|---|---|---|
| committer | Russell Belfer <rb@github.com> | 2012-10-01 12:32:55 -0700 |
| commit | 7c411fd9b2aa63cdf6ace07640fdae91b695660b (patch) | |
| tree | 1e56d2ff82c7b6c0d29d15709ae05d50ca0080a8 | |
| parent | cc5bf359a6a56b2abd898feccf2c33dc2a5f6a3e (diff) | |
| download | libgit2-7c411fd9b2aa63cdf6ace07640fdae91b695660b.tar.gz | |
Fix up more Win64 compile warnings
| -rw-r--r-- | src/refs.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/refs.c b/src/refs.c index 693870a0b..f250cd8b4 100644 --- a/src/refs.c +++ b/src/refs.c @@ -1608,12 +1608,12 @@ static int ensure_segment_validity(const char *name) 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; assert(name && len > 0); @@ -1665,10 +1665,10 @@ int git_reference__normalize_name( if (segment_len > 0) { 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_truncate(buf, + git_buf_truncate(buf, cur_len + segment_len + (segments_count ? 1 : 0)); if (git_buf_oom(buf)) @@ -1704,7 +1704,7 @@ int git_reference__normalize_name( goto cleanup; 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)))) goto cleanup; |
