Fix printf format specifier in PoolAlloc.cpp.
%Iu is used for size_t printf arguments in MSVC. The GCC equivalent is %z. MSVC does not support %z though.
Review URL: https://codereview.appspot.com/5578050
git-svn-id: https://angleproject.googlecode.com/svn/trunk@977 736b8ea6-26fd-11df-bfd4-992fa37f6226
diff --git a/src/compiler/PoolAlloc.cpp b/src/compiler/PoolAlloc.cpp
index 4956ef7..d5c3599 100644
--- a/src/compiler/PoolAlloc.cpp
+++ b/src/compiler/PoolAlloc.cpp
@@ -157,8 +157,13 @@
char assertMsg[80];
// We don't print the assert message. It's here just to be helpful.
+#if defined(_MSC_VER)
sprintf(assertMsg, "PoolAlloc: Damage %s %Iu byte allocation at 0x%p\n",
locText, size, data());
+#else
+ sprintf(assertMsg, "PoolAlloc: Damage %s %z byte allocation at 0x%p\n",
+ locText, size, data());
+#endif
assert(0 && "PoolAlloc: Damage in guard block");
}
}