summaryrefslogtreecommitdiff
path: root/sha1_file.c
diff options
context:
space:
mode:
authorLibravatar Mika Kukkonen <mikukkon@miku.homelinux.net>2005-06-21 23:04:33 +0300
committerLibravatar Linus Torvalds <torvalds@ppc970.osdl.org>2005-06-21 13:30:55 -0700
commitd565b3412a0242e2c729bd77d18c74ecd57184dc (patch)
tree7fca6cb370ba8a446c51e0368a74d3d94f8bf564 /sha1_file.c
parentgit checkout: fix default head case (diff)
downloadtgif-d565b3412a0242e2c729bd77d18c74ecd57184dc.tar.xz
[PATCH] Fix several gcc4 signedness warnings
Here is a patch that fixes several gcc4 warnings about different signedness, all between char and unsigned char. I tried to keep the patch minimal so resertod to casts in three places. Signed-off-by: Mika Kukkonen <mikukkon@iki.fi> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'sha1_file.c')
-rw-r--r--sha1_file.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/sha1_file.c b/sha1_file.c
index e648c068b5..6d6073da85 100644
--- a/sha1_file.c
+++ b/sha1_file.c
@@ -332,7 +332,7 @@ int unpack_sha1_header(z_stream *stream, void *map, unsigned long mapsize, void
void *unpack_sha1_rest(z_stream *stream, void *buffer, unsigned long size)
{
int bytes = strlen(buffer) + 1;
- char *buf = xmalloc(1+size);
+ unsigned char *buf = xmalloc(1+size);
memcpy(buf, buffer + bytes, stream->total_out - bytes);
bytes = stream->total_out - bytes;
@@ -472,7 +472,7 @@ int sha1_file_size(const unsigned char *sha1, unsigned long *sizep)
* The initial part of the delta starts at delta_data_head +
* 20. Borrow code from patch-delta to read the result size.
*/
- data = hdr + strlen(hdr) + 1 + 20;
+ data = (unsigned char *)(hdr + strlen(hdr) + 1 + 20);
/* Skip over the source size; we are not interested in
* it and we cannot verify it because we do not want