Reland "Add format-specifier warnings to SkDebugf."
This is a reland of e58831cd9578805634b986b434a20757277b3a36
Original change's description:
> Add format-specifier warnings to SkDebugf.
>
> This CL fixes up many existing format-specifier violations in Skia.
> Note that GCC has a warning for formatting nothing, so existing calls to
> `SkDebugf("")` have been removed, or replaced with `SkDebugf("%s", "")`.
> These were apparently meant to be used as a place to set a breakpoint.
>
> Some of our clients also use SkDebug with bad format specifiers, so this
> check is currently only enabled when SKIA_IMPLEMENTATION is true.
>
> Change-Id: I8177a1298a624c6936adc24e0d8f481362a356d0
> Bug: skia:12143
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/420902
> Auto-Submit: John Stiles <johnstiles@google.com>
> Commit-Queue: Brian Osman <brianosman@google.com>
> Reviewed-by: Brian Osman <brianosman@google.com>
Bug: skia:12143
Change-Id: Id3c0c21436ebd13899908d5ed5d44c42a0e23921
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/421918
Commit-Queue: John Stiles <johnstiles@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
diff --git a/docs/examples/Pixmap_addr.cpp b/docs/examples/Pixmap_addr.cpp
index 8e2fd2a..eabe576 100644
--- a/docs/examples/Pixmap_addr.cpp
+++ b/docs/examples/Pixmap_addr.cpp
@@ -9,10 +9,10 @@
SkPixmap pixmap(SkImageInfo::Make(image->width(), image->height(), kN32_SkColorType,
image->alphaType()), (const void*) &pixels.front(), image->width() * 4);
image->readPixels(nullptr, pixmap, 0, 0);
- SkDebugf("pixels address: 0x%llx\n", pixmap.addr());
+ SkDebugf("pixels address: 0x%p\n", pixmap.addr());
SkPixmap inset;
if (pixmap.extractSubset(&inset, {128, 128, 512, 512})) {
- SkDebugf("inset address: 0x%llx\n", inset.addr());
+ SkDebugf("inset address: 0x%p\n", inset.addr());
}
}
} // END FIDDLE