提交 0ee19dce 编写于 作者: L Linus Torvalds

Avoid signedness warnings in sha1_file.c

Very irritating.  But "snprintf()" wants "char *", and zlib wants
"unsigned char *".
上级 d5f1befc
......@@ -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 */;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册