Fix MSVC amd64 compilation warnings

This commit is contained in:
nulltoken 2012-09-20 14:06:49 +02:00
parent 28abf3dbd2
commit 9ac8b113b1
4 changed files with 5 additions and 5 deletions

View File

@ -25,7 +25,7 @@
struct checkout_diff_data
{
git_buf *path;
int workdir_len;
size_t workdir_len;
git_checkout_opts *checkout_opts;
git_indexer_stats *stats;
git_repository *owner;

View File

@ -1354,9 +1354,9 @@ int git_diff_iterator_num_lines_in_hunk(git_diff_iterator *iter)
return error;
if (iter->hunk_curr)
return iter->hunk_curr->line_count;
return (int)iter->hunk_curr->line_count;
if (iter->hunk_head)
return iter->hunk_head->line_count;
return (int)iter->hunk_head->line_count;
return 0;
}

View File

@ -166,7 +166,7 @@ static int send_request(transport_http *t, const char *service, void *data, ssiz
}
if (WinHttpSendRequest(t->request, WINHTTP_NO_ADDITIONAL_HEADERS, 0,
data, content_length, content_length, 0) == FALSE) {
data, (DWORD)content_length, (DWORD)content_length, 0) == FALSE) {
giterr_set(GITERR_OS, "Failed to send request");
goto on_error;
}

View File

@ -72,7 +72,7 @@ void git__utf8_to_16(wchar_t *dest, size_t length, const char *src)
void git__utf8_to_16(wchar_t *dest, size_t length, const char *src)
{
MultiByteToWideChar(CP_UTF8, 0, src, -1, dest, length);
MultiByteToWideChar(CP_UTF8, 0, src, -1, dest, (int)length);
}
void git__utf16_to_8(char *out, const wchar_t *input)