From: Tim Kientzle Date: Mon, 9 Feb 2009 06:00:29 +0000 (-0500) Subject: Fix a couple of signed/unsigned mismatches. X-Git-Tag: v2.7.0~313 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=438b291adccdc2ddea83c5bfbf2a43b2b446aedb;p=thirdparty%2Flibarchive.git Fix a couple of signed/unsigned mismatches. SVN-Revision: 591 --- diff --git a/libarchive/archive_read_support_compression_bzip2.c b/libarchive/archive_read_support_compression_bzip2.c index 1504ae9cb..7a1cabd41 100644 --- a/libarchive/archive_read_support_compression_bzip2.c +++ b/libarchive/archive_read_support_compression_bzip2.c @@ -200,7 +200,7 @@ bzip2_filter_read(struct archive_read_filter *self, const void **p) { struct private_data *state; size_t read_avail, decompressed; - unsigned char *read_buf; + const char *read_buf; ssize_t ret; state = (struct private_data *)self->data; @@ -262,11 +262,11 @@ bzip2_filter_read(struct archive_read_filter *self, const void **p) /* stream.next_in is really const, but bzlib * doesn't declare it so. */ - read_buf = (unsigned char *)(uintptr_t) + read_buf = __archive_read_filter_ahead(self->upstream, 1, &ret); if (read_buf == NULL) return (ARCHIVE_FATAL); - state->stream.next_in = read_buf; + state->stream.next_in = (char *)(uintptr_t)read_buf; state->stream.avail_in = ret; /* There is no more data, return whatever we have. */ if (ret == 0) { @@ -280,7 +280,7 @@ bzip2_filter_read(struct archive_read_filter *self, const void **p) /* Decompress as much as we can in one pass. */ ret = BZ2_bzDecompress(&(state->stream)); __archive_read_filter_consume(self->upstream, - (unsigned char *)state->stream.next_in - read_buf); + state->stream.next_in - read_buf); switch (ret) { case BZ_STREAM_END: /* Found end of stream. */