aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/utils
diff options
context:
space:
mode:
authorGravatar tomhudson@google.com <tomhudson@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81>2012-08-14 15:03:35 +0000
committerGravatar tomhudson@google.com <tomhudson@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81>2012-08-14 15:03:35 +0000
commit8afae61a57f87e4a50578effce6c428031499301 (patch)
treeba9a4d4497a0416b932b384502e3b519af57e3a1 /src/utils
parent9ed02b9da25a76ee4c73c1ab19c18b899a223a17 (diff)
Clean up most clang warnings outside animator/
Diffstat (limited to 'src/utils')
-rw-r--r--src/utils/SkDumpCanvas.cpp15
1 files changed, 8 insertions, 7 deletions
diff --git a/src/utils/SkDumpCanvas.cpp b/src/utils/SkDumpCanvas.cpp
index d1db4e23a8..8573f885de 100644
--- a/src/utils/SkDumpCanvas.cpp
+++ b/src/utils/SkDumpCanvas.cpp
@@ -129,20 +129,21 @@ static void toString(const SkBitmap& bm, SkString* str) {
}
}
-static void toString(const void* text, size_t len, SkPaint::TextEncoding enc,
+static void toString(const void* text, size_t byteLen, SkPaint::TextEncoding enc,
SkString* str) {
+ // FIXME: this code appears to be untested - and probably unused - and probably wrong
switch (enc) {
case SkPaint::kUTF8_TextEncoding:
- str->printf("\"%.*s\"%s", SkMax32(len, 32), (const char*) text,
- len > 32 ? "..." : "");
+ str->printf("\"%.*s\"%s", SkMax32(byteLen, 32), (const char*) text,
+ byteLen > 32 ? "..." : "");
break;
case SkPaint::kUTF16_TextEncoding:
- str->printf("\"%.*S\"%s", SkMax32(len, 32), (const wchar_t*) text,
- len > 64 ? "..." : "");
+ str->printf("\"%.*S\"%s", SkMax32(byteLen, 32), (const wchar_t*) text,
+ byteLen > 64 ? "..." : "");
break;
case SkPaint::kUTF32_TextEncoding:
- str->printf("\"%.*S\"%s", SkMax32(len, 32), (const wchar_t*) text,
- len > 128 ? "..." : "");
+ str->printf("\"%.*S\"%s", SkMax32(byteLen, 32), (const wchar_t*) text,
+ byteLen > 128 ? "..." : "");
break;
case SkPaint::kGlyphID_TextEncoding:
str->set("<glyphs>");