Skip to content

Commit

Permalink
minizip: tiny fixes:
Browse files Browse the repository at this point in the history
fix cppcheck notes:
(error) Resource leak: fpOutCD
(warning) %lld in format string (no. 2) requires 'long long'...
  • Loading branch information
tehnick committed Jun 26, 2018
1 parent 869ee6d commit 369310c
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion tools/zip/minizip/minizip.c
Original file line number Diff line number Diff line change
Expand Up @@ -232,7 +232,7 @@ int isLargeFile(const char* filename)
int n = FSEEKO_FUNC(pFile, 0, SEEK_END);
pos = FTELLO_FUNC(pFile);

printf("File : %s is %lld bytes\n", filename, pos);
printf("File : %s is %llu bytes\n", filename, (unsigned long long)pos);

if(pos >= 0xffffffff)
largeFile = 1;
Expand Down
2 changes: 1 addition & 1 deletion tools/zip/minizip/mztools.c
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ uLong* bytesRecovered;
FILE* fpZip = fopen(file, "rb");
FILE* fpOut = fopen(fileOut, "wb");
FILE* fpOutCD = fopen(fileOutTmp, "wb");
if (fpZip != NULL && fpOut != NULL) {
if (fpZip != NULL && fpOut != NULL && fpOutCD != NULL) {
int entries = 0;
uLong totalBytes = 0;
char header[30];
Expand Down

0 comments on commit 369310c

Please sign in to comment.