From 63cfb6872b5e7b823709536edecfe181edba3807 Mon Sep 17 00:00:00 2001 From: Eric Fiselier Date: Fri, 16 Jun 2017 06:17:52 +0000 Subject: Fix potential bug by casting to the POSIX specified type llvm-svn: 305549 --- libcxx/src/experimental/filesystem/operations.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'libcxx/src/experimental/filesystem/operations.cpp') 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(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(); -- cgit v1.2.3