bitcoin/bitcoin — pull request #1807 by laanwj (2012-09-09 13:10:27+00:00)
Title: Add printf-style warnings to strprintf() and OutputDebugStringF()

This finds about ~150 potential problems with wrong format characters on a 64 bit build.

Most mistakes seem to have to do with using `%d` for `size_t` / `ssize_t`. When memory addresses are 32-bit this is no problem, however on 64-bit architectures this is wrong. See also http://stackoverflow.com/questions/1546789/clean-code-to-printf-size-t-in-c-or-nearest-equivalent-of-c99s-z-in-c

I don't feel like fixing all the warnings right now, but it is a useful diagnostic nevertheless as it may reveal hidden bugs. This pull does add macros akin to `PRI64x` to help with this, and represent format characters for these types for MSVC and GCC:
- `PRIszx`: hex
- `PRIszu`: unsigned (size_t)
- `PRIszd`: signed (ssize_t)