aboutsummaryrefslogtreecommitdiffstats
path: root/libarchive/test/test_read_format_rar5.c
diff options
context:
space:
mode:
Diffstat (limited to 'libarchive/test/test_read_format_rar5.c')
-rw-r--r--libarchive/test/test_read_format_rar5.c26
1 files changed, 13 insertions, 13 deletions
diff --git a/libarchive/test/test_read_format_rar5.c b/libarchive/test/test_read_format_rar5.c
index 7f2f32df48c5..0be9c45a5d49 100644
--- a/libarchive/test/test_read_format_rar5.c
+++ b/libarchive/test/test_read_format_rar5.c
@@ -96,7 +96,7 @@ int extract_one(struct archive* a, struct archive_entry* ae, uint32_t crc) {
int ret = 1;
uint32_t computed_crc;
- fsize = archive_entry_size(ae);
+ fsize = (la_ssize_t) archive_entry_size(ae);
buf = malloc(fsize);
if(buf == NULL)
return 1;
@@ -110,13 +110,13 @@ int extract_one(struct archive* a, struct archive_entry* ae, uint32_t crc) {
computed_crc = crc32(0, buf, fsize);
assertEqualInt(computed_crc, crc);
ret = 0;
-
+
fn_exit:
free(buf);
return ret;
}
-DEFINE_TEST(test_read_format_rar5_stored)
+DEFINE_TEST(test_read_format_rar5_stored)
{
const char helloworld_txt[] = "hello libarchive test suite!\n";
la_ssize_t file_size = sizeof(helloworld_txt) - 1;
@@ -143,7 +143,7 @@ DEFINE_TEST(test_read_format_rar5_stored)
DEFINE_TEST(test_read_format_rar5_compressed)
{
const int DATA_SIZE = 1200;
- uint8_t buff[DATA_SIZE];
+ uint8_t buff[1200];
PROLOGUE("test_read_format_rar5_compressed.rar");
@@ -161,7 +161,7 @@ DEFINE_TEST(test_read_format_rar5_compressed)
DEFINE_TEST(test_read_format_rar5_multiple_files)
{
const int DATA_SIZE = 4096;
- uint8_t buff[DATA_SIZE];
+ uint8_t buff[4096];
PROLOGUE("test_read_format_rar5_multiple_files.rar");
@@ -173,7 +173,7 @@ DEFINE_TEST(test_read_format_rar5_multiple_files)
assertEqualInt(DATA_SIZE, archive_entry_size(ae));
assertA(DATA_SIZE == archive_read_data(a, buff, DATA_SIZE));
assertA(verify_data(buff, 1, DATA_SIZE));
-
+
assertA(0 == archive_read_next_header(a, &ae));
assertEqualString("test2.bin", archive_entry_pathname(ae));
assertEqualInt(DATA_SIZE, archive_entry_size(ae));
@@ -207,7 +207,7 @@ DEFINE_TEST(test_read_format_rar5_multiple_files)
DEFINE_TEST(test_read_format_rar5_multiple_files_solid)
{
const int DATA_SIZE = 4096;
- uint8_t buff[DATA_SIZE];
+ uint8_t buff[4096];
PROLOGUE("test_read_format_rar5_multiple_files_solid.rar");
@@ -216,7 +216,7 @@ DEFINE_TEST(test_read_format_rar5_multiple_files_solid)
assertEqualInt(DATA_SIZE, archive_entry_size(ae));
assertA(DATA_SIZE == archive_read_data(a, buff, DATA_SIZE));
assertA(verify_data(buff, 1, DATA_SIZE));
-
+
assertA(0 == archive_read_next_header(a, &ae));
assertEqualString("test2.bin", archive_entry_pathname(ae));
assertEqualInt(DATA_SIZE, archive_entry_size(ae));
@@ -309,7 +309,7 @@ DEFINE_TEST(test_read_format_rar5_multiarchive_skip_all_but_second)
DEFINE_TEST(test_read_format_rar5_blake2)
{
const la_ssize_t proper_size = 814;
- uint8_t buf[proper_size];
+ uint8_t buf[814];
PROLOGUE("test_read_format_rar5_blake2.rar");
assertA(0 == archive_read_next_header(a, &ae));
@@ -334,7 +334,7 @@ DEFINE_TEST(test_read_format_rar5_arm_filter)
* test. */
const la_ssize_t proper_size = 90808;
- uint8_t buf[proper_size];
+ uint8_t buf[90808];
PROLOGUE("test_read_format_rar5_arm.rar");
assertA(0 == archive_read_next_header(a, &ae));
@@ -598,7 +598,7 @@ DEFINE_TEST(test_read_format_rar5_multiarchive_solid_skip_all_but_last)
EPILOGUE();
}
-DEFINE_TEST(test_read_format_rar5_solid_skip_all)
+DEFINE_TEST(test_read_format_rar5_solid_skip_all)
{
const char* reffile = "test_read_format_rar5_solid.rar";
@@ -623,7 +623,7 @@ DEFINE_TEST(test_read_format_rar5_solid_skip_all)
EPILOGUE();
}
-DEFINE_TEST(test_read_format_rar5_solid_skip_all_but_first)
+DEFINE_TEST(test_read_format_rar5_solid_skip_all_but_first)
{
const char* reffile = "test_read_format_rar5_solid.rar";
@@ -649,7 +649,7 @@ DEFINE_TEST(test_read_format_rar5_solid_skip_all_but_first)
EPILOGUE();
}
-DEFINE_TEST(test_read_format_rar5_solid_skip_all_but_second)
+DEFINE_TEST(test_read_format_rar5_solid_skip_all_but_second)
{
const char* reffile = "test_read_format_rar5_solid.rar";