DescriptionAdd 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. Also define an SK_SIZE_T_SPECIFIER macro so there's a cross-platform way of printing a size_t.
Note: since the functions on SkString are non-static member functions, the parameters must offset by one in this case to accomodate the "this" argument, which is why they're (2, 3) and not (1, 2).
This turned up a number of bugs; I've fixed the obvious ones, but where I wasn't sure, I left them in. These are:
../bench/ShaderMaskBench.cpp:55: warning: too many arguments for format
(should we omit the argument, or add it to the format string?)
../tests/MathTest.cpp:202: warning: too few arguments for format
One is missing, but which argument belongs to which format string?
Patch Set 1 #
Total comments: 4
MessagesTotal messages: 5
|