From: Tim Kientzle Date: Tue, 29 Jul 2008 20:28:13 +0000 (-0400) Subject: Minor corrections: remove unused vars, fix a couple of X-Git-Tag: v2.6.0~122 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=f350d8f05f753744ed3cf8426a80012c6e851f3b;p=thirdparty%2Flibarchive.git Minor corrections: remove unused vars, fix a couple of type issues. SVN-Revision: 170 --- diff --git a/libarchive/archive_write_set_format_mtree.c b/libarchive/archive_write_set_format_mtree.c index 3a67deb96..ff01aa1cd 100644 --- a/libarchive/archive_write_set_format_mtree.c +++ b/libarchive/archive_write_set_format_mtree.c @@ -197,7 +197,6 @@ static int archive_write_mtree_finish(struct archive_write *a) { struct mtree_writer *mtree= a->format_data; - int ret; archive_write_set_bytes_in_last_block(&a->archive, 1); diff --git a/libarchive/archive_write_set_format_shar.c b/libarchive/archive_write_set_format_shar.c index aa76471b2..a8b4eb3b4 100644 --- a/libarchive/archive_write_set_format_shar.c +++ b/libarchive/archive_write_set_format_shar.c @@ -286,12 +286,12 @@ archive_write_shar_header(struct archive_write *a, struct archive_entry *entry) static ssize_t archive_write_shar_data_sed(struct archive_write *a, const void *buff, size_t n) { - static const ensured = 65533; + static const size_t ensured = 65533; struct shar *shar; const char *src; char *buf, *buf_end; int ret; - size_t line, written = n; + size_t written = n; shar = (struct shar *)a->format_data; if (!shar->has_data || n == 0) @@ -331,7 +331,7 @@ archive_write_shar_data_sed(struct archive_write *a, const void *buff, size_t n) else *buf++ = 'X'; } - + if (buf >= buf_end) { shar->work.length = buf - shar->work.s; ret = (*a->compressor.write)(a, shar->work.s, @@ -363,7 +363,7 @@ uuencode_group(const char _in[3], char out[4]) out[3] = UUENC( 0x3f & t ); } -static int +static void uuencode_line(struct shar *shar, const char *inbuf, size_t len) { char tmp_buf[3], *buf; @@ -393,7 +393,7 @@ uuencode_line(struct shar *shar, const char *inbuf, size_t len) buf += 4; } *buf++ = '\n'; - if (buf - shar->work.s > shar->work.length + 62) + if ((buf - shar->work.s) > (ptrdiff_t)(shar->work.length + 62)) __archive_errx(1, "Buffer overflow"); shar->work.length = buf - shar->work.s; }