aboutsummaryrefslogtreecommitdiff
path: root/src/streams.h
diff options
context:
space:
mode:
authorWladimir J. van der Laan <laanwj@gmail.com>2017-03-03 15:48:18 +0100
committerWladimir J. van der Laan <laanwj@gmail.com>2017-03-03 15:48:53 +0100
commit75d012e8c7d0b2dfec0fe34807eabb4f661f4fb7 (patch)
tree068cbf16562b5cfbb1887ffb55385a5f12b76059 /src/streams.h
parentba80a684cfef95233330de58af92ec4baec875fd (diff)
parentad1ae7ae2e90a29fcfaaddee2d5acd025de72cbe (diff)
Merge #8808: Do not shadow variables (gcc set)
ad1ae7a Check and enable -Wshadow by default. (Pavel Janík) 9de90bb Do not shadow variables (gcc set) (Pavel Janík) Tree-SHA512: 9517feb423dc8ddd63896016b25324673bfbe0bffa97f22996f59d7a3fcbdc2ebf2e43ac02bc067546f54e293e9b2f2514be145f867321e9031f895c063d9fb8
Diffstat (limited to 'src/streams.h')
-rw-r--r--src/streams.h6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/streams.h b/src/streams.h
index 1d3b55c91e..3c24c2c373 100644
--- a/src/streams.h
+++ b/src/streams.h
@@ -584,11 +584,11 @@ protected:
readNow = nAvail;
if (readNow == 0)
return false;
- size_t read = fread((void*)&vchBuf[pos], 1, readNow, src);
- if (read == 0) {
+ size_t nBytes = fread((void*)&vchBuf[pos], 1, readNow, src);
+ if (nBytes == 0) {
throw std::ios_base::failure(feof(src) ? "CBufferedFile::Fill: end of file" : "CBufferedFile::Fill: fread failed");
} else {
- nSrcPos += read;
+ nSrcPos += nBytes;
return true;
}
}