From 54b371b76707a3568d8d651db285f8b29b729c42 Mon Sep 17 00:00:00 2001 From: twinaphex Date: Sun, 28 Jun 2020 19:43:55 +0200 Subject: [PATCH] (deps/7zip) Use rferror instead of ferror --- deps/7zip/7zFile.c | 2 +- deps/7zip/7zIn.c | 8 ++++++-- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/deps/7zip/7zFile.c b/deps/7zip/7zFile.c index f58ce3328d..514ca718af 100644 --- a/deps/7zip/7zFile.c +++ b/deps/7zip/7zFile.c @@ -71,7 +71,7 @@ WRes File_Write(CSzFile *p, const void *data, size_t *size) *size = rfwrite(data, 1, originalSize, p->file); if (*size == originalSize) return 0; - return ferror(p->file); + return rferror(p->file); } WRes File_Seek(CSzFile *p, int64_t *pos, ESzSeek origin) diff --git a/deps/7zip/7zIn.c b/deps/7zip/7zIn.c index 62c1d5eb82..dbb76e0699 100644 --- a/deps/7zip/7zIn.c +++ b/deps/7zip/7zIn.c @@ -505,8 +505,12 @@ static SRes SzReadSwitch(CSzData *sd) static SRes SzGetNextFolderItem(CSzData *sd, CSzFolder *folder, ISzAlloc *alloc) { - uint32_t numCoders, numBindPairs, numPackStreams, i; - uint32_t numInStreams = 0, numOutStreams = 0; + unsigned i; + uint32_t numBindPairs = 0; + uint32_t numPackStreams = 0; + uint32_t numInStreams = 0; + uint32_t numOutStreams = 0; + uint32_t numCoders = 0; RINOK(SzReadNumber32(sd, &numCoders)); if (numCoders > NUM_FOLDER_CODERS_MAX)