summaryrefslogtreecommitdiff
path: root/src/common/file_util.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/common/file_util.cpp')
-rw-r--r--src/common/file_util.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/common/file_util.cpp b/src/common/file_util.cpp
index 1a1f5d9b5..df234c225 100644
--- a/src/common/file_util.cpp
+++ b/src/common/file_util.cpp
@@ -303,7 +303,7 @@ bool Copy(const std::string& srcFilename, const std::string& destFilename) {
303 // copy loop 303 // copy loop
304 while (!feof(input)) { 304 while (!feof(input)) {
305 // read input 305 // read input
306 int rnum = fread(buffer, sizeof(char), BSIZE, input); 306 size_t rnum = fread(buffer, sizeof(char), BSIZE, input);
307 if (rnum != BSIZE) { 307 if (rnum != BSIZE) {
308 if (ferror(input) != 0) { 308 if (ferror(input) != 0) {
309 LOG_ERROR(Common_Filesystem, "failed reading from source, %s --> %s: %s", 309 LOG_ERROR(Common_Filesystem, "failed reading from source, %s --> %s: %s",
@@ -313,7 +313,7 @@ bool Copy(const std::string& srcFilename, const std::string& destFilename) {
313 } 313 }
314 314
315 // write output 315 // write output
316 int wnum = fwrite(buffer, sizeof(char), rnum, output); 316 size_t wnum = fwrite(buffer, sizeof(char), rnum, output);
317 if (wnum != rnum) { 317 if (wnum != rnum) {
318 LOG_ERROR(Common_Filesystem, "failed writing to output, %s --> %s: %s", 318 LOG_ERROR(Common_Filesystem, "failed writing to output, %s --> %s: %s",
319 srcFilename.c_str(), destFilename.c_str(), GetLastErrorMsg()); 319 srcFilename.c_str(), destFilename.c_str(), GetLastErrorMsg());