diff options
author | nulltoken <emeric.fermas@gmail.com> | 2012-12-17 12:20:52 +0100 |
---|---|---|
committer | nulltoken <emeric.fermas@gmail.com> | 2012-12-17 17:16:32 +0100 |
commit | bdb94c21fd995da8c5b83ba30500996b3397bf3a (patch) | |
tree | e82de6fc0b233d04c9852f48e78ac329e156115c | |
parent | 71131b550904824a047d41c7da174686202abd6a (diff) | |
download | libgit2-bdb94c21fd995da8c5b83ba30500996b3397bf3a.tar.gz |
Fix MSVC compilation warnings
-rw-r--r-- | src/indexer.c | 6 | ||||
-rw-r--r-- | src/win32/posix_w32.c | 1 |
2 files changed, 3 insertions, 4 deletions
diff --git a/src/indexer.c b/src/indexer.c index 2fb780412..b9240f30b 100644 --- a/src/indexer.c +++ b/src/indexer.c @@ -201,7 +201,7 @@ static void hash_header(git_hash_ctx *ctx, git_off_t len, git_otype type) char buffer[64]; size_t hdrlen; - hdrlen = git_odb__format_object_header(buffer, sizeof(buffer), len, type); + hdrlen = git_odb__format_object_header(buffer, sizeof(buffer), (size_t)len, type); git_hash_update(ctx, buffer, hdrlen); } @@ -269,11 +269,11 @@ static int crc_object(uint32_t *crc_out, git_mwindow_file *mwf, git_off_t start, crc = crc32(0L, Z_NULL, 0); while (size) { - ptr = git_mwindow_open(mwf, &w, start, size, &left); + ptr = git_mwindow_open(mwf, &w, start, (size_t)size, &left); if (ptr == NULL) return -1; - len = min(left, size); + len = min(left, (size_t)size); crc = crc32(crc, ptr, len); size -= len; start += len; diff --git a/src/win32/posix_w32.c b/src/win32/posix_w32.c index 3a4398bbd..2ce92b9e5 100644 --- a/src/win32/posix_w32.c +++ b/src/win32/posix_w32.c @@ -59,7 +59,6 @@ static int do_lstat( { WIN32_FILE_ATTRIBUTE_DATA fdata; wchar_t fbuf[GIT_WIN_PATH], lastch; - DWORD last_error; int flen; flen = git__utf8_to_16(fbuf, GIT_WIN_PATH, file_name); |