summaryrefslogtreecommitdiff
path: root/src/sha1.c
diff options
context:
space:
mode:
authorRussell Belfer <rb@github.com>2012-04-13 13:00:10 -0700
committerRussell Belfer <rb@github.com>2012-04-17 10:47:39 -0700
commit44ef8b1b300f0cd3d8572fa1b40d257462f28240 (patch)
tree34f38bee213d1041fec7ac9dc4e63191182f3bf8 /src/sha1.c
parentf201d613a80f7ad6f54d90eb7a7a0d8b8c72676b (diff)
downloadlibgit2-44ef8b1b300f0cd3d8572fa1b40d257462f28240.tar.gz
Fix warnings on 64-bit windows builds
This fixes all the warnings on win64 except those in deps, which come from the regex code.
Diffstat (limited to 'src/sha1.c')
-rw-r--r--src/sha1.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/sha1.c b/src/sha1.c
index af3c2d2d0..8aaedeb8f 100644
--- a/src/sha1.c
+++ b/src/sha1.c
@@ -232,7 +232,7 @@ void git__blk_SHA1_Init(blk_SHA_CTX *ctx)
ctx->H[4] = 0xc3d2e1f0;
}
-void git__blk_SHA1_Update(blk_SHA_CTX *ctx, const void *data, unsigned long len)
+void git__blk_SHA1_Update(blk_SHA_CTX *ctx, const void *data, size_t len)
{
unsigned int lenW = ctx->size & 63;
@@ -242,7 +242,7 @@ void git__blk_SHA1_Update(blk_SHA_CTX *ctx, const void *data, unsigned long len)
if (lenW) {
unsigned int left = 64 - lenW;
if (len < left)
- left = len;
+ left = (unsigned int)len;
memcpy(lenW + (char *)ctx->W, data, left);
lenW = (lenW + left) & 63;
len -= left;