diff options
author | Junio C Hamano <gitster@pobox.com> | 2010-06-25 11:45:27 -0700 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2010-06-25 11:45:27 -0700 |
commit | f526d120f649ec4426b559e94e09655b5a4f2b87 (patch) | |
tree | d1be8cbf55a8f0913b4347bece6ea5ecbcb580b0 /block-sha1/sha1.c | |
parent | ba4d01bd74edae1e4adb540a03ba17961f8dd4b2 (diff) | |
parent | 9eafa1201b2dcc703258ca7cd53de8ac4de74565 (diff) | |
download | git-f526d120f649ec4426b559e94e09655b5a4f2b87.tar.gz git-f526d120f649ec4426b559e94e09655b5a4f2b87.tar.xz |
Merge branch 'maint'
* maint:
msvc: Fix some compiler warnings
Documentation: grep: fix asciidoc problem with --
msvc: Fix some "expr evaluates to function" compiler warnings
Diffstat (limited to 'block-sha1/sha1.c')
-rw-r--r-- | block-sha1/sha1.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/block-sha1/sha1.c b/block-sha1/sha1.c index d8934757a..d880a5336 100644 --- a/block-sha1/sha1.c +++ b/block-sha1/sha1.c @@ -236,13 +236,13 @@ void blk_SHA1_Init(blk_SHA_CTX *ctx) void blk_SHA1_Update(blk_SHA_CTX *ctx, const void *data, unsigned long len) { - int lenW = ctx->size & 63; + unsigned int lenW = ctx->size & 63; ctx->size += len; /* Read the data into W and process blocks as they get full */ if (lenW) { - int left = 64 - lenW; + unsigned int left = 64 - lenW; if (len < left) left = len; memcpy(lenW + (char *)ctx->W, data, left); @@ -269,8 +269,8 @@ void blk_SHA1_Final(unsigned char hashout[20], blk_SHA_CTX *ctx) int i; /* Pad with a binary 1 (ie 0x80), then zeroes, then length */ - padlen[0] = htonl(ctx->size >> 29); - padlen[1] = htonl(ctx->size << 3); + padlen[0] = htonl((uint32_t)(ctx->size >> 29)); + padlen[1] = htonl((uint32_t)(ctx->size << 3)); i = ctx->size & 63; blk_SHA1_Update(ctx, pad, 1+ (63 & (55 - i))); |