summaryrefslogtreecommitdiffstats
path: root/programs/bench.c
diff options
context:
space:
mode:
authorYann Collet <cyan@fb.com>2017-09-10 21:32:38 (GMT)
committerYann Collet <cyan@fb.com>2017-09-10 21:32:38 (GMT)
commita30cba08f489c07e0d6085248287cd5dcc901b30 (patch)
tree35b768df854d5764d6232de84ad2fe5266f137ca /programs/bench.c
parenta2b4f732f4ab941dbd3108fb3c36c3afc54c47ee (diff)
downloadlz4-a30cba08f489c07e0d6085248287cd5dcc901b30.zip
lz4-a30cba08f489c07e0d6085248287cd5dcc901b30.tar.gz
lz4-a30cba08f489c07e0d6085248287cd5dcc901b30.tar.bz2
fixed a bunch of -Wcomma warnings
reported by @rvandermeulen (#398)
Diffstat (limited to 'programs/bench.c')
-rw-r--r--programs/bench.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/programs/bench.c b/programs/bench.c
index 05ddaff..5c83d59 100644
--- a/programs/bench.c
+++ b/programs/bench.c
@@ -428,7 +428,10 @@ static void BMK_loadFiles(void* buffer, size_t bufferSize,
f = fopen(fileNamesTable[n], "rb");
if (f==NULL) EXM_THROW(10, "impossible to open file %s", fileNamesTable[n]);
DISPLAYUPDATE(2, "Loading %s... \r", fileNamesTable[n]);
- if (fileSize > bufferSize-pos) fileSize = bufferSize-pos, nbFiles=n; /* buffer too small - stop after this file */
+ if (fileSize > bufferSize-pos) { /* buffer too small - stop after this file */
+ fileSize = bufferSize-pos;
+ nbFiles=n;
+ }
{ size_t const readSize = fread(((char*)buffer)+pos, 1, (size_t)fileSize, f);
if (readSize != (size_t)fileSize) EXM_THROW(11, "could not read %s", fileNamesTable[n]);
pos += readSize; }