summaryrefslogtreecommitdiffstats
path: root/libcxx/src/memory.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'libcxx/src/memory.cpp')
-rw-r--r--libcxx/src/memory.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/libcxx/src/memory.cpp b/libcxx/src/memory.cpp
index cb5e5e7b06a..1c1b438540a 100644
--- a/libcxx/src/memory.cpp
+++ b/libcxx/src/memory.cpp
@@ -154,7 +154,7 @@ align(size_t alignment, size_t size, void*& ptr, size_t& space)
{
char* p1 = static_cast<char*>(ptr);
char* p2 = (char*)((size_t)(p1 + (alignment - 1)) & -alignment);
- ptrdiff_t d = p2 - p1;
+ size_t d = static_cast<size_t>(p2 - p1);
if (d <= space - size)
{
r = p2;
OpenPOWER on IntegriCloud