Always enforce format specifiers on SkDebugf.
Change-Id: Icba60060ab4dec45c8ef1b1e2f35056626adc0a7 Bug: skia:12143, 192062380 Reviewed-on: https://skia-review.googlesource.com/c/skia/+/428616 Commit-Queue: John Stiles <johnstiles@google.com> Reviewed-by: Derek Sollenberger <djsollen@google.com>
This commit is contained in:
parent
63fd35484e
commit
55f0d7acfa
@ -453,12 +453,7 @@
|
||||
[[noreturn]] SK_API extern void sk_abort_no_print(void);
|
||||
|
||||
#ifndef SkDebugf
|
||||
#if SKIA_IMPLEMENTATION
|
||||
SK_API void SkDebugf(const char format[], ...) SK_PRINTF_LIKE(1, 2);
|
||||
#else
|
||||
// TODO(johnstiles): fix external code which misuses format specifiers
|
||||
SK_API void SkDebugf(const char format[], ...);
|
||||
#endif
|
||||
SK_API void SkDebugf(const char format[], ...) SK_PRINTF_LIKE(1, 2);
|
||||
#endif
|
||||
#if defined(SK_BUILD_FOR_LIBFUZZER)
|
||||
SK_API SK_PRINTF_LIKE(1, 2) inline void SkDebugf(const char format[], ...) {}
|
||||
|
@ -3549,7 +3549,7 @@ protected:
|
||||
std::vector<LineMetrics> metrics;
|
||||
paragraph->getLineMetrics(metrics);
|
||||
for (auto& metric : metrics) {
|
||||
SkDebugf("Line[%d:%d <= %d <=%d)\n", metric.fStartIndex, metric.fEndExcludingWhitespaces, metric.fEndIndex, metric.fEndIncludingNewline);
|
||||
SkDebugf("Line[%zu:%zu <= %zu <= %zu)\n", metric.fStartIndex, metric.fEndExcludingWhitespaces, metric.fEndIndex, metric.fEndIncludingNewline);
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user