]> git.ipfire.org Git - thirdparty/libarchive.git/commitdiff
Fix build failure on Visual Studio.
authorMichihiro NAKAJIMA <ggcueroad@gmail.com>
Wed, 4 Apr 2012 08:52:05 +0000 (17:52 +0900)
committerMichihiro NAKAJIMA <ggcueroad@gmail.com>
Wed, 4 Apr 2012 08:54:44 +0000 (17:54 +0900)
libarchive/archive_read_support_format_rar.c

index 4f553f2285532fbd3d7d568673afa29fb9b2d3de..3ef7200aa2f62175832a80a5b4bfc5e213d56738 100644 (file)
@@ -1344,7 +1344,8 @@ read_header(struct archive_read *a, struct archive_entry *entry,
   }
 
   rar->bytes_uncopied = rar->bytes_unconsumed = 0;
-  rar->lzss.position = rar->dictionary_size = rar->offset = 0;
+  rar->lzss.position = rar->offset = 0;
+  rar->dictionary_size = 0;
   rar->offset_outgoing = 0;
   rar->br.cache_avail = 0;
   rar->br.avail_in = 0;
@@ -2606,7 +2607,7 @@ rar_read_ahead(struct archive_read *a, size_t min, ssize_t *avail)
   if (avail)
   {
     if (*avail > rar->bytes_remaining)
-      *avail = rar->bytes_remaining;
+      *avail = (ssize_t)rar->bytes_remaining;
     if (*avail < 0)
       return NULL;
     else if (*avail == 0 && rar->main_flags & MHD_VOLUME &&