summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: ee7dc31)
raw | patch | inline | side by side (parent: ee7dc31)
author | Brandon Casey <drafnel@gmail.com> | |
Fri, 14 Aug 2009 22:52:15 +0000 (17:52 -0500) | ||
committer | Junio C Hamano <gitster@pobox.com> | |
Sat, 15 Aug 2009 02:13:00 +0000 (19:13 -0700) |
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>
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>
block-sha1/sha1.c | patch | blob | history |
diff --git a/block-sha1/sha1.c b/block-sha1/sha1.c
index e5a100754e1d2c62ef168d0c120180ef4da7647b..464cb258aaa11786d3615a55c0ae8dff95150667 100644 (file)
--- a/block-sha1/sha1.c
+++ b/block-sha1/sha1.c
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)