diff options
author | Tim Kientzle <kientzle@FreeBSD.org> | 2009-03-07 03:34:34 +0000 |
---|---|---|
committer | Tim Kientzle <kientzle@FreeBSD.org> | 2009-03-07 03:34:34 +0000 |
commit | 419eb469bcfec8735f60a8abec5575233b812936 (patch) | |
tree | 7beb53cdcbdeb2c512b47aeed743839c63d56f8b /lib/libarchive/test | |
parent | 71938b80a7f414f82b985dfa903da73b817139ba (diff) | |
download | src-419eb469bcfec8735f60a8abec5575233b812936.tar.gz src-419eb469bcfec8735f60a8abec5575233b812936.zip |
Merge r596,r690 from libarchive.googlecode.com: Minor style and compile
warning fixes for test_read_pax_truncated.c.
Notes
Notes:
svn path=/head/; revision=189483
Diffstat (limited to 'lib/libarchive/test')
-rw-r--r-- | lib/libarchive/test/test_read_pax_truncated.c | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/lib/libarchive/test/test_read_pax_truncated.c b/lib/libarchive/test/test_read_pax_truncated.c index d2af2ca0ed8b..393fd9fca556 100644 --- a/lib/libarchive/test/test_read_pax_truncated.c +++ b/lib/libarchive/test/test_read_pax_truncated.c @@ -29,9 +29,8 @@ DEFINE_TEST(test_read_pax_truncated) { struct archive_entry *ae; struct archive *a; - ssize_t used, i; - size_t buff_size = 1000000; - ssize_t filedata_size = 100000; + size_t used, i, buff_size = 1000000; + size_t filedata_size = 100000; char *buff = malloc(buff_size); char *buff2 = malloc(buff_size); char *filedata = malloc(filedata_size); @@ -40,7 +39,8 @@ DEFINE_TEST(test_read_pax_truncated) assert((a = archive_write_new()) != NULL); assertA(0 == archive_write_set_format_pax(a)); assertA(0 == archive_write_set_compression_none(a)); - assertA(0 == archive_write_open_memory(a, buff, buff_size, &used)); + assertEqualIntA(a, ARCHIVE_OK, + archive_write_open_memory(a, buff, buff_size, &used)); /* * Write a file to it. @@ -56,7 +56,8 @@ DEFINE_TEST(test_read_pax_truncated) archive_entry_set_size(ae, filedata_size); assertA(0 == archive_write_header(a, ae)); archive_entry_free(ae); - assertA(filedata_size == archive_write_data(a, filedata, filedata_size)); + assertA((ssize_t)filedata_size + == archive_write_data(a, filedata, filedata_size)); /* Close out the archive. */ assertA(0 == archive_write_close(a)); |