Skip to content
Browse files

Fix build failure in aggressive warnings on FreeBSD/amd64.

  • Loading branch information...
1 parent 1e53f8d commit 1ecb1bb23cc28c22e787f3bf5a65342bcb0f3282 @ggcueroad ggcueroad committed Feb 14, 2012
Showing with 4 additions and 4 deletions.
  1. +1 −1 libarchive/archive_read.c
  2. +1 −1 libarchive/archive_read_data_into_fd.c
  3. +1 −1 libarchive/archive_read_disk_posix.c
  4. +1 −1 tar/write.c
View
2 libarchive/archive_read.c
@@ -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 <
View
2 libarchive/archive_read_data_into_fd.c
@@ -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) {
View
2 libarchive/archive_read_disk_posix.c
@@ -782,7 +782,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;
/*
View
2 tar/write.c
@@ -654,7 +654,7 @@ copy_file_data_block(struct bsdtar *bsdtar, struct archive *a,
}
while (sparse > 0) {
- if (sparse > bsdtar->buff_size)
+ if (sparse > (int64_t)bsdtar->buff_size)
ns = bsdtar->buff_size;
else
ns = (size_t)sparse;

0 comments on commit 1ecb1bb

Please sign in to comment.
Something went wrong with that request. Please try again.