From a38cbf9f62a9d7200086b9965745ad7330cac259 Mon Sep 17 00:00:00 2001 From: Yann Collet Date: Fri, 18 Nov 2016 18:00:54 -0800 Subject: [PATCH] fixed : shadow global variable on gcc 4.4 (minor) --- programs/lz4io.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/programs/lz4io.c b/programs/lz4io.c index e8eaf60..2ffb541 100644 --- a/programs/lz4io.c +++ b/programs/lz4io.c @@ -853,17 +853,17 @@ static unsigned long long LZ4IO_decompressLZ4F(dRess_t ress, FILE* srcFile, FILE static unsigned long long LZ4IO_passThrough(FILE* finput, FILE* foutput, unsigned char MNstore[MAGICNUMBER_SIZE]) { size_t buffer[PTSIZET]; - size_t read = 1; + size_t readBytes = 1; unsigned long long total = MAGICNUMBER_SIZE; unsigned storedSkips = 0; size_t const sizeCheck = fwrite(MNstore, 1, MAGICNUMBER_SIZE, foutput); if (sizeCheck != MAGICNUMBER_SIZE) EXM_THROW(50, "Pass-through write error"); - while (read) { - read = fread(buffer, 1, PTSIZE, finput); - total += read; - storedSkips = LZ4IO_fwriteSparse(foutput, buffer, read, storedSkips); + while (readBytes) { + readBytes = fread(buffer, 1, PTSIZE, finput); + total += readBytes; + storedSkips = LZ4IO_fwriteSparse(foutput, buffer, readBytes, storedSkips); } if (ferror(finput)) EXM_THROW(51, "Read Error") -- 2.7.4