svn commit: trunk/busybox/archival/libunarchive

andersen at busybox.net andersen at busybox.net
Mon Jan 30 17:27:04 UTC 2006


Author: andersen
Date: 2006-01-30 09:27:00 -0800 (Mon, 30 Jan 2006)
New Revision: 13719

Log:
fixup a few types to prevent gcc (rightfully) whining about mixing
signed and unsigned, unmatches pointer target types, etc


Modified:
   trunk/busybox/archival/libunarchive/decompress_unzip.c


Changeset:
Modified: trunk/busybox/archival/libunarchive/decompress_unzip.c
===================================================================
--- trunk/busybox/archival/libunarchive/decompress_unzip.c	2006-01-30 17:17:14 UTC (rev 13718)
+++ trunk/busybox/archival/libunarchive/decompress_unzip.c	2006-01-30 17:27:00 UTC (rev 13719)
@@ -92,7 +92,7 @@
 
 /* gunzip_window size--must be a power of two, and
  *  at least 32K for zip's deflate method */
-static const int gunzip_wsize = 0x8000;
+static const unsigned int gunzip_wsize = 0x8000;
 static unsigned char *gunzip_window;
 
 static unsigned int *gunzip_crc_table;
@@ -234,7 +234,7 @@
  */
 int huft_build(unsigned int *b, const unsigned int n,
 			   const unsigned int s, const unsigned short *d,
-			   const unsigned char *e, huft_t ** t, int *m)
+			   const unsigned char *e, huft_t ** t, unsigned int *m)
 {
 	unsigned a;				/* counter for codes of length k */
 	unsigned c[BMAX + 1];	/* bit length count table */
@@ -539,7 +539,7 @@
 
 static int inflate_stored(int my_n, int my_b_stored, int my_k_stored, int setup)
 {
-	static int n, b_stored, k_stored, w;
+	static unsigned int n, b_stored, k_stored, w;
 	if (setup) {
 		n = my_n;
 		b_stored = my_b_stored;
@@ -552,7 +552,7 @@
 	while (n--) {
 		b_stored = fill_bitbuffer(b_stored, &k_stored, 8);
 		gunzip_window[w++] = (unsigned char) b_stored;
-		if (w == (unsigned int) gunzip_wsize) {
+		if (w == gunzip_wsize) {
 			gunzip_outbuf_count = (w);
 			//flush_gunzip_window();
 			w = 0;




More information about the busybox-cvs mailing list