diff --git a/archival/libunarchive/archive_xread_all_eof.c b/archival/libunarchive/archive_xread_all_eof.c
index 7e082ab..c93dfa2 100644
--- a/archival/libunarchive/archive_xread_all_eof.c
+++ b/archival/libunarchive/archive_xread_all_eof.c
@@ -12,7 +12,7 @@
 	ssize_t size;
 
 	size = full_read(archive_handle->src_fd, buf, count);
-	if (size != 0 && size != count) {
+	if (size != 0 && size != (ssize_t)count) {
 		bb_error_msg_and_die("short read: %u of %u",
 				(unsigned)size, (unsigned)count);
 	}
diff --git a/archival/libunarchive/decompress_bunzip2.c b/archival/libunarchive/decompress_bunzip2.c
index c1b1273..f74fdf1 100644
--- a/archival/libunarchive/decompress_bunzip2.c
+++ b/archival/libunarchive/decompress_bunzip2.c
@@ -103,7 +103,7 @@
 	/* If we need to get more data from the byte buffer, do so.  (Loop getting
 	   one byte at a time to enforce endianness and avoid unaligned access.) */
 
-	while (bd->inbufBitCount < bits_wanted) {
+	while ((int)(bd->inbufBitCount) < bits_wanted) {
 
 		/* If we need to read more data from file into byte buffer, do so */
 
@@ -172,7 +172,7 @@
 
 	if (get_bits(bd, 1)) return RETVAL_OBSOLETE_INPUT;
 	origPtr = get_bits(bd, 24);
-	if (origPtr > dbufSize) return RETVAL_DATA_ERROR;
+	if ((int)origPtr > dbufSize) return RETVAL_DATA_ERROR;
 
 	/* mapping table: if some byte values are never used (encoding things
 	   like ascii text), the compression code removes the gaps to have fewer
@@ -368,7 +368,7 @@
 		   j = get_bits(bd, hufGroup->maxLen);
 		 */
 
-		while (bd->inbufBitCount < hufGroup->maxLen) {
+		while ((int)(bd->inbufBitCount) < hufGroup->maxLen) {
 			if (bd->inbufPos == bd->inbufCount) {
 				j = get_bits(bd, hufGroup->maxLen);
 				goto got_huff_bits;
@@ -505,7 +505,7 @@
 	   it doesn't qualify as a run (hence writeRunCountdown=5). */
 
 	if (dbufCount) {
-		if (origPtr >= dbufCount) return RETVAL_DATA_ERROR;
+		if ((int)origPtr >= dbufCount) return RETVAL_DATA_ERROR;
 		bd->writePos = dbuf[origPtr];
 	    bd->writeCurrent = (unsigned char)(bd->writePos & 0xff);
 		bd->writePos >>= 8;
diff --git a/archival/libunarchive/decompress_unlzma.c b/archival/libunarchive/decompress_unlzma.c
index 5fb7eae..c320400 100644
--- a/archival/libunarchive/decompress_unlzma.c
+++ b/archival/libunarchive/decompress_unlzma.c
@@ -329,7 +329,7 @@
 			if (buffer_pos == header.dict_size) {
 				buffer_pos = 0;
 				global_pos += header.dict_size;
-				if (full_write(dst_fd, buffer, header.dict_size) != header.dict_size)
+				if (full_write(dst_fd, buffer, header.dict_size) != (ssize_t)header.dict_size)
 					goto bad;
 				USE_DESKTOP(total_written += header.dict_size;)
 			}
@@ -480,7 +480,7 @@
 				if (buffer_pos == header.dict_size) {
 					buffer_pos = 0;
 					global_pos += header.dict_size;
-					if (full_write(dst_fd, buffer, header.dict_size) != header.dict_size)
+					if (full_write(dst_fd, buffer, header.dict_size) != (ssize_t)header.dict_size)
 						goto bad;
 					USE_DESKTOP(total_written += header.dict_size;)
 				}
@@ -489,7 +489,7 @@
 		}
 	}
 
-	if (full_write(dst_fd, buffer, buffer_pos) != buffer_pos) {
+	if (full_write(dst_fd, buffer, buffer_pos) != (ssize_t)buffer_pos) {
  bad:
 		rc_free(rc);
 		return -1;
diff --git a/archival/libunarchive/decompress_unzip.c b/archival/libunarchive/decompress_unzip.c
index a764fbc..9036fab 100644
--- a/archival/libunarchive/decompress_unzip.c
+++ b/archival/libunarchive/decompress_unzip.c
@@ -922,7 +922,7 @@
 /* Two callsites, both in inflate_get_next_window */
 static void calculate_gunzip_crc(STATE_PARAM_ONLY)
 {
-	int n;
+	unsigned n;
 	for (n = 0; n < gunzip_outbuf_count; n++) {
 		gunzip_crc = gunzip_crc_table[((int) gunzip_crc ^ (gunzip_window[n])) & 0xff] ^ (gunzip_crc >> 8);
 	}
@@ -1003,7 +1003,7 @@
 	while (1) {
 		int r = inflate_get_next_window(PASS_STATE_ONLY);
 		nwrote = full_write(out, gunzip_window, gunzip_outbuf_count);
-		if (nwrote != gunzip_outbuf_count) {
+		if (nwrote != (ssize_t)gunzip_outbuf_count) {
 			bb_perror_msg("write");
 			n = -1;
 			goto ret;
@@ -1064,7 +1064,7 @@
 {
 	int count = bytebuffer_size - bytebuffer_offset;
 
-	if (count < n) {
+	if (count < (int)n) {
 		memmove(bytebuffer, &bytebuffer[bytebuffer_offset], count);
 		bytebuffer_offset = 0;
 		bytebuffer_size = full_read(gunzip_src_fd, &bytebuffer[count], bytebuffer_max - count);
