forked from OSchip/llvm-project
Fix potential bug by casting to the POSIX specified type
llvm-svn: 305549
This commit is contained in:
parent
da6ea0d3e8
commit
63cfb6872b
|
@ -842,7 +842,7 @@ void __rename(const path& from, const path& to, std::error_code *ec) {
|
|||
}
|
||||
|
||||
void __resize_file(const path& p, std::uintmax_t size, std::error_code *ec) {
|
||||
if (::truncate(p.c_str(), static_cast<long>(size)) == -1)
|
||||
if (::truncate(p.c_str(), static_cast<::off_t>(size)) == -1)
|
||||
set_or_throw(ec, "resize_file", p);
|
||||
else if (ec)
|
||||
ec->clear();
|
||||
|
|
Loading…
Reference in New Issue