Update test.c

fix compiler warnings.
pull/2389/head
Kim Kulling 2019-03-29 09:05:24 +01:00 committed by GitHub
parent 92ec834fec
commit d62724ab4f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 4 deletions

View File

@ -102,8 +102,7 @@ static void test_read(void) {
assert(0 == zip_entry_close(zip)); assert(0 == zip_entry_close(zip));
free(buf); free(buf);
buf = NULL; buf = NULL;
bufsize = 0;
assert(0 == zip_entry_open(zip, "test/test-2.txt")); assert(0 == zip_entry_open(zip, "test/test-2.txt"));
assert(strlen(TESTDATA2) == zip_entry_size(zip)); assert(strlen(TESTDATA2) == zip_entry_size(zip));
assert(CRC32DATA2 == zip_entry_crc32(zip)); assert(CRC32DATA2 == zip_entry_crc32(zip));
@ -132,8 +131,7 @@ static void test_read(void) {
assert(0 == zip_entry_close(zip)); assert(0 == zip_entry_close(zip));
free(buf); free(buf);
buf = NULL; buf = NULL;
bufsize = 0;
buftmp = strlen(TESTDATA1); buftmp = strlen(TESTDATA1);
buf = calloc(buftmp, sizeof(char)); buf = calloc(buftmp, sizeof(char));
assert(0 == zip_entry_open(zip, "test/test-1.txt")); assert(0 == zip_entry_open(zip, "test/test-1.txt"));