diff options
author | Martin Matuska <mm@FreeBSD.org> | 2012-07-27 08:24:12 +0000 |
---|---|---|
committer | Martin Matuska <mm@FreeBSD.org> | 2012-07-27 08:24:12 +0000 |
commit | 81418b36c02b6434acd4b8ae4cfb8c80a3742fd4 (patch) | |
tree | 4b551422581ae9a8093415e07c619e2a59ef6a7b /libarchive/archive_read_support_format_lha.c | |
parent | 132160f77407d2174d2bec0a8ba9c6eefc4429d7 (diff) |
Diffstat (limited to 'libarchive/archive_read_support_format_lha.c')
-rw-r--r-- | libarchive/archive_read_support_format_lha.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/libarchive/archive_read_support_format_lha.c b/libarchive/archive_read_support_format_lha.c index ace3b3a9cfd9b..a92b072ab60e0 100644 --- a/libarchive/archive_read_support_format_lha.c +++ b/libarchive/archive_read_support_format_lha.c @@ -951,7 +951,7 @@ lha_read_file_header_1(struct archive_read *a, struct lha *lha) /* Read extended headers */ err2 = lha_read_file_extended_header(a, lha, NULL, 2, - lha->compsize + 2, &extdsize); + (size_t)(lha->compsize + 2), &extdsize); if (err2 < ARCHIVE_WARN) return (err2); if (err2 < err) @@ -1446,7 +1446,7 @@ lha_read_data_none(struct archive_read *a, const void **buff, return (ARCHIVE_FATAL); } if (bytes_avail > lha->entry_bytes_remaining) - bytes_avail = lha->entry_bytes_remaining; + bytes_avail = (ssize_t)lha->entry_bytes_remaining; lha->entry_crc_calculated = lha_crc16(lha->entry_crc_calculated, *buff, bytes_avail); *size = bytes_avail; @@ -1529,7 +1529,7 @@ lha_read_data_lzh(struct archive_read *a, const void **buff, return (ARCHIVE_FATAL); } if (bytes_avail > lha->entry_bytes_remaining) - bytes_avail = lha->entry_bytes_remaining; + bytes_avail = (ssize_t)lha->entry_bytes_remaining; lha->strm.avail_in = bytes_avail; lha->strm.total_in = 0; @@ -1575,7 +1575,7 @@ static int archive_read_format_lha_read_data_skip(struct archive_read *a) { struct lha *lha; - off_t bytes_skipped; + int64_t bytes_skipped; lha = (struct lha *)(a->format->data); @@ -2016,7 +2016,7 @@ lzh_copy_from_window(struct lzh_stream *strm, struct lzh_dec *ds) if (ds->w_pos - ds->copy_pos <= strm->avail_out) copy_bytes = ds->w_pos - ds->copy_pos; else - copy_bytes = strm->avail_out; + copy_bytes = (size_t)strm->avail_out; memcpy(strm->next_out, ds->w_buff + ds->copy_pos, copy_bytes); ds->copy_pos += copy_bytes; @@ -2024,7 +2024,7 @@ lzh_copy_from_window(struct lzh_stream *strm, struct lzh_dec *ds) if (ds->w_remaining <= strm->avail_out) copy_bytes = ds->w_remaining; else - copy_bytes = strm->avail_out; + copy_bytes = (size_t)strm->avail_out; memcpy(strm->next_out, ds->w_buff + ds->w_size - ds->w_remaining, copy_bytes); ds->w_remaining -= copy_bytes; |