fix warnings on Mac in ssamplecode
Fix these class of warnings:
- unused functions
- unused locals
- sign mismatch
- missing function prototypes
- missing newline at end of file
- 64 to 32 bit truncation
The changes prefer to link in dead code in the debug build
with 'if (false)' than to comment it out, but trivial cases
are commented out or sometimes deleted if it appears to be
a copy/paste error.
Review URL: https://codereview.appspot.com/6301044
git-svn-id: http://skia.googlecode.com/svn/trunk@4183 2bbb7eff-a529-9590-31e7-b0007b416f81
diff --git a/samplecode/SampleXfermodesBlur.cpp b/samplecode/SampleXfermodesBlur.cpp
index 11b1268..feccf44 100644
--- a/samplecode/SampleXfermodesBlur.cpp
+++ b/samplecode/SampleXfermodesBlur.cpp
@@ -76,7 +76,7 @@
#ifdef SK_BUILD_FOR_MAC
static const char* gNames[] = { "Arial", "Times", "Courier", "Lucida" };
- for (int j = 0; j < SK_ARRAY_COUNT(gNames); ++j) {
+ for (size_t j = 0; j < SK_ARRAY_COUNT(gNames); ++j) {
CFStringRef name = CFStringCreateWithCString(NULL, gNames[j], kCFStringEncodingUTF8);
CTFontRef font = CTFontCreateWithName(name, 0, NULL);
SkTypeface* face = SkCreateTypefaceFromCTFont(font);
@@ -99,9 +99,6 @@
const static int W = 64;
const static int H = 64;
XfermodesBlurView() {
- const int W = 64;
- const int H = 64;
-
fBG.setConfig(SkBitmap::kARGB_4444_Config, 2, 2, 4);
fBG.setPixels(gBG);
fBG.setIsOpaque(true);