fix warnings: unused variable

This commit is contained in:
David Siegel 2023-06-05 22:14:30 +02:00
parent 5a6df34d99
commit 47208b234d

View File

@ -2891,7 +2891,7 @@ bool GetFileSizeInBytes(size_t *filesize_out, std::string *err,
}
// For directory(and pipe?), peek() will fail(Posix gnustl/libc++ only)
int buf = f.peek();
f.peek();
if (!f) {
if (err) {
(*err) += "File read error. Maybe empty file or invalid file : " + filepath + "\n";
@ -2984,7 +2984,7 @@ bool ReadWholeFile(std::vector<unsigned char> *out, std::string *err,
}
// For directory(and pipe?), peek() will fail(Posix gnustl/libc++ only)
int buf = f.peek();
f.peek();
if (!f) {
if (err) {
(*err) += "File read error. Maybe empty file or invalid file : " + filepath + "\n";