diff options
author | tomhudson@google.com <tomhudson@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81> | 2012-08-14 15:03:35 +0000 |
---|---|---|
committer | tomhudson@google.com <tomhudson@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81> | 2012-08-14 15:03:35 +0000 |
commit | 8afae61a57f87e4a50578effce6c428031499301 (patch) | |
tree | ba9a4d4497a0416b932b384502e3b519af57e3a1 /src/utils | |
parent | 9ed02b9da25a76ee4c73c1ab19c18b899a223a17 (diff) |
Clean up most clang warnings outside animator/
http://codereview.appspot.com/6464058/
git-svn-id: http://skia.googlecode.com/svn/trunk@5079 2bbb7eff-a529-9590-31e7-b0007b416f81
Diffstat (limited to 'src/utils')
-rw-r--r-- | src/utils/SkDumpCanvas.cpp | 15 |
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>"); |