Revert "Add format-specifier warnings to SkDebugf."
This reverts commit e58831cd9578805634b986b434a20757277b3a36.
Reason for revert: looks like breaking a few build bots
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>
TBR=brianosman@google.com,ethannicholas@google.com,johnstiles@google.com
Change-Id: I07848c1bf8992925c9498e916744d0840355a077
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: skia:12143
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/421917
Reviewed-by: Tyler Denniston <tdenniston@google.com>
Commit-Queue: Tyler Denniston <tdenniston@google.com>
diff --git a/samplecode/SampleAudio.cpp b/samplecode/SampleAudio.cpp
index a3347d7..c09a816 100644
--- a/samplecode/SampleAudio.cpp
+++ b/samplecode/SampleAudio.cpp
@@ -30,7 +30,7 @@
SkDebugf("make: dur:%g time%g state:%d",
fPlayer->duration(),
fPlayer->time(),
- (int)fPlayer->state());
+ fPlayer->state());
}
fBar = { 10, 10, 510, 30 };
diff --git a/samplecode/SampleCusp.cpp b/samplecode/SampleCusp.cpp
index 9fb5a75..dd33002 100644
--- a/samplecode/SampleCusp.cpp
+++ b/samplecode/SampleCusp.cpp
@@ -162,6 +162,7 @@
// draw time to make it easier to guess when the bad cubic was drawn
std::string timeStr = std::to_string((float) (curTime - start) / 1000.f);
canvas->drawSimpleText(timeStr.c_str(), timeStr.size(), SkTextEncoding::kUTF8, 20, 20, SkFont(), SkPaint());
+ SkDebugf("");
}
bool onAnimate(double nanos) override {
diff --git a/samplecode/SampleSVGFile.cpp b/samplecode/SampleSVGFile.cpp
index 8b34442..bc1aaa9 100644
--- a/samplecode/SampleSVGFile.cpp
+++ b/samplecode/SampleSVGFile.cpp
@@ -29,7 +29,7 @@
void onOnceBeforeDraw() override {
SkFILEStream svgStream(fPath.c_str());
if (!svgStream.isValid()) {
- SkDebugf("file not found: \"%s\"\n", fPath.c_str());
+ SkDebugf("file not found: \"path\"\n", fPath.c_str());
return;
}