diff options
author | Eric Fiselier <eric@efcs.ca> | 2017-06-16 06:17:52 +0000 |
---|---|---|
committer | Eric Fiselier <eric@efcs.ca> | 2017-06-16 06:17:52 +0000 |
commit | 63cfb6872b5e7b823709536edecfe181edba3807 (patch) | |
tree | 2d9dde026bf5975294776635bb6af5c44c517027 /libcxx/src/experimental/filesystem/operations.cpp | |
parent | da6ea0d3e8c0bc94c806101c885154900f5573a9 (diff) | |
download | bcm5719-llvm-63cfb6872b5e7b823709536edecfe181edba3807.tar.gz bcm5719-llvm-63cfb6872b5e7b823709536edecfe181edba3807.zip |
Fix potential bug by casting to the POSIX specified type
llvm-svn: 305549
Diffstat (limited to 'libcxx/src/experimental/filesystem/operations.cpp')
-rw-r--r-- | libcxx/src/experimental/filesystem/operations.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/libcxx/src/experimental/filesystem/operations.cpp b/libcxx/src/experimental/filesystem/operations.cpp index 2856ae453a6..e9bc0eb6e30 100644 --- a/libcxx/src/experimental/filesystem/operations.cpp +++ b/libcxx/src/experimental/filesystem/operations.cpp @@ -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(); |