diff options
author | Brandon Casey <drafnel@gmail.com> | 2009-08-15 02:52:15 +0400 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2009-08-15 06:13:00 +0400 |
commit | a12218572f2875e91b6c3c12559b076c4949a675 (patch) | |
tree | 317729704a668088d3916494d7e1ae357a31ca5b | |
parent | ee7dc310af660f423732369e955651ef2f05011d (diff) |
block-sha1/sha1.c: silence compiler complaints by casting void * to char *
Some compilers produce errors when arithmetic is attempted on pointers to
void. We want computations done on byte addresses, so cast them to char *
to work them around.
Signed-off-by: Brandon Casey <casey@nrlssc.navy.mil>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
-rw-r--r-- | block-sha1/sha1.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/block-sha1/sha1.c b/block-sha1/sha1.c index e5a100754e..464cb258aa 100644 --- a/block-sha1/sha1.c +++ b/block-sha1/sha1.c @@ -246,14 +246,14 @@ void blk_SHA1_Update(blk_SHA_CTX *ctx, const void *data, unsigned long len) memcpy(lenW + (char *)ctx->W, data, left); lenW = (lenW + left) & 63; len -= left; - data += left; + data = ((const char *)data + left); if (lenW) return; blk_SHA1_Block(ctx, ctx->W); } while (len >= 64) { blk_SHA1_Block(ctx, data); - data += 64; + data = ((const char *)data + 64); len -= 64; } if (len) |