Add an SK_PRINTF_LIKE macro, which declares a function to have printf-like
semantics, allowing gcc and clang to check the format string against the
arguments. Enable its use on SkString (printf, appendf, and prependf). Also
define an SK_SIZE_T_SPECIFIER macro so there's a cross-platform way of
printing a size_t.
Review URL: http://codereview.appspot.com/6375043/
git-svn-id: http://skia.googlecode.com/svn/trunk@4485 2bbb7eff-a529-9590-31e7-b0007b416f81
diff --git a/bench/MemoryBench.cpp b/bench/MemoryBench.cpp
index e732687..5fdb7f1 100644
--- a/bench/MemoryBench.cpp
+++ b/bench/MemoryBench.cpp
@@ -22,7 +22,7 @@
public:
ChunkAllocBench(void* param, size_t minSize) : INHERITED(param) {
fMinSize = minSize;
- fName.printf("chunkalloc_%d", minSize);
+ fName.printf("chunkalloc_" SK_SIZE_T_SPECIFIER, minSize);
}
protected: