Quash a whole bunch of warnings

llvm-svn: 145624
Cr-Mirrored-From: sso://chromium.googlesource.com/_direct/external/github.com/llvm/llvm-project
Cr-Mirrored-Commit: c206366fd7774aff222578c2680b931a4c2c35ba
diff --git a/src/memory.cpp b/src/memory.cpp
index cb5e5e7..1c1b438 100644
--- a/src/memory.cpp
+++ b/src/memory.cpp
@@ -154,7 +154,7 @@
     {
         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;