diff --git a/src/vfs/tar/tar-internal.c b/src/vfs/tar/tar-internal.c index 05f67e62e..d0691edc6 100644 --- a/src/vfs/tar/tar-internal.c +++ b/src/vfs/tar/tar-internal.c @@ -128,7 +128,7 @@ tar_flush_read (tar_super_t *archive) size_t status; status = mc_read (archive->fd, archive->record_start->buffer, record_size); - if (status == record_size) + if ((idx_t) status == record_size) return TRUE; return tar_short_read (status, archive); @@ -286,7 +286,7 @@ stoint (const char *arg, char **arglim, gboolean *overflow, intmax_t minval, uin v |= ckd_add (&i, i, *p - '0') ? 1 : 0; } - v |= maxval < i ? 1 : 0; + v |= maxval < (uintmax_t) i ? 1 : 0; if (v != 0) i = maxval; } diff --git a/src/vfs/tar/tar.c b/src/vfs/tar/tar.c index a6003229e..185c9f4b8 100644 --- a/src/vfs/tar/tar.c +++ b/src/vfs/tar/tar.c @@ -327,7 +327,7 @@ tar_available_space_after (const union block *pointer) static read_header tar_checksum (const union block *header) { - int i; + unsigned int i; int unsigned_sum = 0; /* the POSIX one :-) */ int signed_sum = 0; /* the Sun one :-( */ int recorded_sum;