Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.kernel.org/pub/scm/git/git.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMika Kukkonen <mikukkon@miku.homelinux.net>2005-06-22 00:04:33 +0400
committerLinus Torvalds <torvalds@ppc970.osdl.org>2005-06-22 00:30:55 +0400
commitd565b3412a0242e2c729bd77d18c74ecd57184dc (patch)
tree7fca6cb370ba8a446c51e0368a74d3d94f8bf564 /sha1_file.c
parentdc14841102bb364c2be200e8456146fc8df970b9 (diff)
[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