Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 7 Mar 2009 02:29:43 +0000 (UTC)
From:      Tim Kientzle <kientzle@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r189475 - head/lib/libarchive
Message-ID:  <200903070229.n272ThkM035747@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: kientzle
Date: Sat Mar  7 02:29:43 2009
New Revision: 189475
URL: http://svn.freebsd.org/changeset/base/189475

Log:
  Merge r591 from libarchive.googlecode.com: signed/unsigned fixes.

Modified:
  head/lib/libarchive/archive_read_support_compression_bzip2.c

Modified: head/lib/libarchive/archive_read_support_compression_bzip2.c
==============================================================================
--- head/lib/libarchive/archive_read_support_compression_bzip2.c	Sat Mar  7 02:24:32 2009	(r189474)
+++ head/lib/libarchive/archive_read_support_compression_bzip2.c	Sat Mar  7 02:29:43 2009	(r189475)
@@ -200,7 +200,7 @@ bzip2_filter_read(struct archive_read_fi
 {
 	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_fi
 
 		/* stream.next_in is really const, but bzlib
 		 * doesn't declare it so. <sigh> */
-		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_fi
 		/* 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. */



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200903070229.n272ThkM035747>