]> git.ipfire.org Git - thirdparty/libarchive.git/commitdiff
Fix build failure in aggressive warnings on FreeBSD/amd64.
authorMichihiro NAKAJIMA <ggcueroad@gmail.com>
Tue, 14 Feb 2012 07:05:25 +0000 (16:05 +0900)
committerMichihiro NAKAJIMA <ggcueroad@gmail.com>
Tue, 14 Feb 2012 07:19:59 +0000 (16:19 +0900)
libarchive/archive_read.c
libarchive/archive_read_data_into_fd.c
libarchive/archive_read_disk_posix.c

index b1d491435421d7f7082f4b2dd2e58fe10c372397..987295f026594ca114f6bddb22f09ef0873e6e24 100644 (file)
@@ -633,7 +633,7 @@ archive_read_data(struct archive *_a, void *buff, size_t s)
                }
 
                /* Compute the amount of zero padding needed. */
-               if (a->read_data_output_offset + s <
+               if (a->read_data_output_offset + (int64_t)s <
                    a->read_data_offset) {
                        len = s;
                } else if (a->read_data_output_offset <
index 14f941070e5cc5c5ddbd28154de21fb3ddd67801..b4398f1ecce879fa2408a18da3283d043b0a6512 100644 (file)
@@ -64,7 +64,7 @@ pad_to(struct archive *a, int fd, int can_lseek,
        }
        while (target_offset > actual_offset) {
                to_write = nulls_size;
-               if (target_offset < actual_offset + nulls_size)
+               if (target_offset < actual_offset + (int64_t)nulls_size)
                        to_write = (size_t)(target_offset - actual_offset);
                bytes_written = write(fd, nulls, to_write);
                if (bytes_written < 0) {
index dd03ceebaa2c7b026f998a979b50d5e7961f6332..94c953aa9a5467acbe23ef5f6eff1627389286c6 100644 (file)
@@ -733,7 +733,7 @@ _archive_read_data_block(struct archive *_a, const void **buff,
        t->entry_buff_size = t->current_filesystem->buff_size;
 
        buffbytes = t->entry_buff_size;
-       if (buffbytes > t->current_sparse->length)
+       if ((int64_t)buffbytes > t->current_sparse->length)
                buffbytes = t->current_sparse->length;
 
        /*