fixed : shadow global variable on gcc 4.4 (minor)
authorYann Collet <cyan@fb.com>
Sat, 19 Nov 2016 02:00:54 +0000 (18:00 -0800)
committerYann Collet <cyan@fb.com>
Sat, 19 Nov 2016 02:00:54 +0000 (18:00 -0800)
programs/lz4io.c

index e8eaf60..2ffb541 100644 (file)
@@ -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")