]> git.ipfire.org Git - thirdparty/libarchive.git/commitdiff
Eliminate some warnings on Visual Studio.
authorMichihiro NAKAJIMA <ggcueroad@gmail.com>
Fri, 21 Jan 2011 15:35:24 +0000 (10:35 -0500)
committerMichihiro NAKAJIMA <ggcueroad@gmail.com>
Fri, 21 Jan 2011 15:35:24 +0000 (10:35 -0500)
SVN-Revision: 2932

cpio/cpio.c
libarchive/test/test_read_truncated_filter.c
tar/test/test_option_r.c
tar/write.c

index ddd62771e5ffd60b6574995357035cb64ce5b9d2..aece67231e827d504c8374e3994b4a8eecee38f3 100644 (file)
@@ -1007,11 +1007,11 @@ list_item_verbose(struct cpio *cpio, struct archive_entry *entry)
                /* Use uname if it's present, else lookup name from uid. */
                uname = archive_entry_uname(entry);
                if (uname == NULL)
-                       uname = lookup_uname(cpio, archive_entry_uid(entry));
+                       uname = lookup_uname(cpio, (uid_t)archive_entry_uid(entry));
                /* Use gname if it's present, else lookup name from gid. */
                gname = archive_entry_gname(entry);
                if (gname == NULL)
-                       gname = lookup_gname(cpio, archive_entry_gid(entry));
+                       gname = lookup_gname(cpio, (uid_t)archive_entry_gid(entry));
        }
 
        /* Print device number or file size. */
index 0f8210d4594dbe10453955819e19d8b7ba8e38d9..f72eaba86be4f71828095e59c211bc9d2a8f7b79 100644 (file)
@@ -78,7 +78,7 @@ test_truncation(const char *compression, int (*set_compression)(struct archive *
                        free(buff);
                        return;
                }
-               for (j = 0; j < datasize; ++j) {
+               for (j = 0; j < (int)datasize; ++j) {
                        data[j] = (char)(rand() % 256);
                }
                failure(path);
index 8d2a882af6a0ac06e936a7f95708c5eed04c1f6f..70c2087c9f6ff95559ef0295254a8306e2a1a1af 100644 (file)
@@ -60,7 +60,7 @@ DEFINE_TEST(test_option_r)
        /* Edit that file with a lot more data and update the archive with a new copy. */
        buff = malloc(buff_size);
        assert(buff != NULL);
-       for (i = 0; i < buff_size; ++i)
+       for (i = 0; i < (int)buff_size; ++i)
                buff[i] = "abcdefghijklmnopqrstuvwxyz"[rand() % 26];
        buff[buff_size - 1] = '\0';
        assertMakeFile("f1", 0644, buff);
index b25e744798afa1bac1090165d63ae2a59267a783..7806eca83ae4823f2aebdee354bbde1f81873091 100644 (file)
@@ -428,7 +428,7 @@ write_archive(struct archive *a, struct bsdtar *bsdtar)
 
        /* Choose a suitable copy buffer size */
        bsdtar->buff_size = 64 * 1024;
-       while (bsdtar->buff_size < bsdtar->bytes_per_block)
+       while (bsdtar->buff_size < (size_t)bsdtar->bytes_per_block)
          bsdtar->buff_size *= 2;
        /* Try to compensate for space we'll lose to alignment. */
        bsdtar->buff_size += 16 * 1024;