Commit e4319635 by apatrick@chromium.org

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
parent c6f7f9d5
...@@ -157,8 +157,13 @@ void TAllocation::checkGuardBlock(unsigned char* blockMem, unsigned char val, co ...@@ -157,8 +157,13 @@ void TAllocation::checkGuardBlock(unsigned char* blockMem, unsigned char val, co
char assertMsg[80]; char assertMsg[80];
// We don't print the assert message. It's here just to be helpful. // 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", sprintf(assertMsg, "PoolAlloc: Damage %s %Iu byte allocation at 0x%p\n",
locText, size, data()); 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"); assert(0 && "PoolAlloc: Damage in guard block");
} }
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment