forked from ShuriZma/suyu
file_util: Fixed implicit type conversion warning (#2503)
This commit is contained in:
parent
ff28080091
commit
a2d0e2d807
|
@ -303,7 +303,7 @@ bool Copy(const std::string& srcFilename, const std::string& destFilename) {
|
||||||
// copy loop
|
// copy loop
|
||||||
while (!feof(input)) {
|
while (!feof(input)) {
|
||||||
// read input
|
// read input
|
||||||
int rnum = fread(buffer, sizeof(char), BSIZE, input);
|
size_t rnum = fread(buffer, sizeof(char), BSIZE, input);
|
||||||
if (rnum != BSIZE) {
|
if (rnum != BSIZE) {
|
||||||
if (ferror(input) != 0) {
|
if (ferror(input) != 0) {
|
||||||
LOG_ERROR(Common_Filesystem, "failed reading from source, %s --> %s: %s",
|
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) {
|
||||||
}
|
}
|
||||||
|
|
||||||
// write output
|
// write output
|
||||||
int wnum = fwrite(buffer, sizeof(char), rnum, output);
|
size_t wnum = fwrite(buffer, sizeof(char), rnum, output);
|
||||||
if (wnum != rnum) {
|
if (wnum != rnum) {
|
||||||
LOG_ERROR(Common_Filesystem, "failed writing to output, %s --> %s: %s",
|
LOG_ERROR(Common_Filesystem, "failed writing to output, %s --> %s: %s",
|
||||||
srcFilename.c_str(), destFilename.c_str(), GetLastErrorMsg());
|
srcFilename.c_str(), destFilename.c_str(), GetLastErrorMsg());
|
||||||
|
|
Loading…
Reference in New Issue