summaryrefslogtreecommitdiff
path: root/sha1_file.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@g5.osdl.org>2005-07-10 15:43:54 -0700
committerLinus Torvalds <torvalds@g5.osdl.org>2005-07-10 15:43:54 -0700
commit0ee19dce2cc21f15fa77e2eb01bdaa3eb490d8ac (patch)
treed781a13bacc4719714b8101f8bb48a1112488fdf /sha1_file.c
parentd5f1befca880ee64230d876535f0f98c5ea6bb86 (diff)
downloadgit-0ee19dce2cc21f15fa77e2eb01bdaa3eb490d8ac.tar.gz
Avoid signedness warnings in sha1_file.c
Very irritating. But "snprintf()" wants "char *", and zlib wants "unsigned char *".
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 15fd6e0436..6b9462cfba 100644
--- a/sha1_file.c
+++ b/sha1_file.c
@@ -1216,7 +1216,7 @@ int write_sha1_to_fd(int fd, const unsigned char *sha1)
ssize_t size;
unsigned long objsize;
int posn = 0;
- char *buf = map_sha1_file_internal(sha1, &objsize);
+ void *buf = map_sha1_file_internal(sha1, &objsize);
z_stream stream;
if (!buf) {
unsigned char *unpacked;
@@ -1240,7 +1240,7 @@ int write_sha1_to_fd(int fd, const unsigned char *sha1)
stream.avail_out = size;
/* First header.. */
- stream.next_in = hdr;
+ stream.next_in = (void *)hdr;
stream.avail_in = hdrlen;
while (deflate(&stream, 0) == Z_OK)
/* nothing */;