diff options
| author | Vicent Martà <vicent@github.com> | 2012-10-01 13:57:32 -0700 |
|---|---|---|
| committer | Vicent Martà <vicent@github.com> | 2012-10-01 13:57:32 -0700 |
| commit | 8bc5caccee4ebb0b9239135fe81750f3b72a8e76 (patch) | |
| tree | 8fed4cac4b5819cdf8ec56b8edfc7d2b78c22dd7 /src | |
| parent | 93b5fabcc03e465609d0d68af13f4ab2cf1e2dfd (diff) | |
| parent | 7c411fd9b2aa63cdf6ace07640fdae91b695660b (diff) | |
| download | libgit2-8bc5caccee4ebb0b9239135fe81750f3b72a8e76.tar.gz | |
Merge pull request #961 from arrbee/win64-cleanups
Win64 cleanups
Diffstat (limited to 'src')
| -rw-r--r-- | src/diff_output.c | 2 | ||||
| -rw-r--r-- | src/refs.c | 12 | ||||
| -rw-r--r-- | src/submodule.c | 2 |
3 files changed, 8 insertions, 8 deletions
diff --git a/src/diff_output.c b/src/diff_output.c index 05bca4668..8a099a433 100644 --- a/src/diff_output.c +++ b/src/diff_output.c @@ -1366,7 +1366,7 @@ int git_diff_patch_num_lines_in_hunk( if (hunk_idx >= patch->hunks_size) return GIT_ENOTFOUND; else - return patch->hunks[hunk_idx].line_count; + return (int)patch->hunks[hunk_idx].line_count; } int git_diff_patch_get_line_in_hunk( diff --git a/src/refs.c b/src/refs.c index 903acccbb..bd6fbee0e 100644 --- a/src/refs.c +++ b/src/refs.c @@ -1610,12 +1610,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); @@ -1667,10 +1667,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)) @@ -1706,7 +1706,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; diff --git a/src/submodule.c b/src/submodule.c index e55e12863..a2162496a 100644 --- a/src/submodule.c +++ b/src/submodule.c @@ -1474,7 +1474,7 @@ static int submodule_wd_status(unsigned int *status, git_submodule *sm) error = git_diff_workdir_to_index(sm_repo, &opt, &diff); if (!error) { - int untracked = + size_t untracked = git_diff_num_deltas_of_type(diff, GIT_DELTA_UNTRACKED); if (untracked > 0) |
