Tests : Unused parameters cleanup

I removed unused parameters in the tests wherever it was trivial to do so. I'm trying to get the easy ones out of the way before we get into more involved discussions around this.
Review URL: https://codereview.appspot.com/7394055

git-svn-id: http://skia.googlecode.com/svn/trunk@7891 2bbb7eff-a529-9590-31e7-b0007b416f81
diff --git a/tests/AAClipTest.cpp b/tests/AAClipTest.cpp
index 1b060a7..5c1d4e1 100644
--- a/tests/AAClipTest.cpp
+++ b/tests/AAClipTest.cpp
@@ -380,7 +380,7 @@
     did_dx_affect(reporter, gUnsafeX, SK_ARRAY_COUNT(gUnsafeX), true);
 }
 
-static void test_regressions(skiatest::Reporter* reporter) {
+static void test_regressions() {
     // these should not assert in the debug build
     // bug was introduced in rev. 3209
     {
@@ -400,7 +400,7 @@
     test_irect(reporter);
     test_rgn(reporter);
     test_path_with_hole(reporter);
-    test_regressions(reporter);
+    test_regressions();
     test_nearly_integral(reporter);
 }
 
diff --git a/tests/BlitRowTest.cpp b/tests/BlitRowTest.cpp
index fca4588..c4a4134 100644
--- a/tests/BlitRowTest.cpp
+++ b/tests/BlitRowTest.cpp
@@ -59,7 +59,7 @@
     return -1;
 }
 
-static int proc_bad(const void* ptr, int, uint32_t, uint32_t* bad) {
+static int proc_bad(const void*, int, uint32_t, uint32_t* bad) {
     *bad = 0;
     return 0;
 }
diff --git a/tests/CanvasTest.cpp b/tests/CanvasTest.cpp
index 8c64d58..006c855 100644
--- a/tests/CanvasTest.cpp
+++ b/tests/CanvasTest.cpp
@@ -430,8 +430,8 @@
 TEST_STEP(PaintSaveLayer, PaintSaveLayerStep);
 
 static void TwoClipOpsStep(SkCanvas* canvas,
-                           skiatest::Reporter* reporter,
-                           CanvasTestStep* testStep) {
+                           skiatest::Reporter*,
+                           CanvasTestStep*) {
     // This test exercises a functionality in SkPicture that leads to the
     // recording of restore offset placeholders.  This test will trigger an
     // assertion at playback time if the placeholders are not properly
@@ -444,8 +444,8 @@
 // exercise fix for http://code.google.com/p/skia/issues/detail?id=560
 // ('SkPathStroker::lineTo() fails for line with length SK_ScalarNearlyZero')
 static void DrawNearlyZeroLengthPathTestStep(SkCanvas* canvas,
-                                             skiatest::Reporter* reporter,
-                                             CanvasTestStep* testStep) {
+                                             skiatest::Reporter*,
+                                             CanvasTestStep*) {
     SkPaint paint;
     paint.setStrokeWidth(SkIntToScalar(1));
     paint.setStyle(SkPaint::kStroke_Style);
@@ -465,8 +465,8 @@
 TEST_STEP(DrawNearlyZeroLengthPath, DrawNearlyZeroLengthPathTestStep);
 
 static void DrawVerticesShaderTestStep(SkCanvas* canvas,
-                                       skiatest::Reporter* reporter,
-                                       CanvasTestStep* testStep) {
+                                       skiatest::Reporter*,
+                                       CanvasTestStep*) {
     SkPoint pts[4];
     pts[0].set(0, 0);
     pts[1].set(SkIntToScalar(kWidth), 0);
@@ -483,8 +483,8 @@
 TEST_STEP_NO_PDF(DrawVerticesShader, DrawVerticesShaderTestStep);
 
 static void DrawPictureTestStep(SkCanvas* canvas,
-                                skiatest::Reporter* reporter,
-                                CanvasTestStep* testStep) {
+                                skiatest::Reporter*,
+                                CanvasTestStep*) {
     SkPicture* testPicture = SkNEW_ARGS(SkPicture, ());
     SkAutoUnref aup(testPicture);
     SkCanvas* testCanvas = testPicture->beginRecording(kWidth, kHeight);
@@ -553,8 +553,8 @@
 TEST_STEP(DrawLayer, DrawLayerTestStep);
 
 static void NestedSaveRestoreWithSolidPaintTestStep(SkCanvas* canvas,
-                                      skiatest::Reporter* reporter,
-                                      CanvasTestStep* testStep) {
+                                      skiatest::Reporter*,
+                                      CanvasTestStep*) {
     // This test step challenges the TestDeferredCanvasStateConsistency
     // test cases because the opaque paint can trigger an optimization
     // that discards previously recorded commands. The challenge is to maintain
@@ -575,8 +575,8 @@
     NestedSaveRestoreWithSolidPaintTestStep);
 
 static void NestedSaveRestoreWithFlushTestStep(SkCanvas* canvas,
-                                      skiatest::Reporter* reporter,
-                                      CanvasTestStep* testStep) {
+                                      skiatest::Reporter*,
+                                      CanvasTestStep*) {
     // This test step challenges the TestDeferredCanvasStateConsistency
     // test case because the canvas flush on a deferred canvas will
     // reset the recording session. The challenge is to maintain correct
diff --git a/tests/ClipperTest.cpp b/tests/ClipperTest.cpp
index b914374..b4eee60 100644
--- a/tests/ClipperTest.cpp
+++ b/tests/ClipperTest.cpp
@@ -48,7 +48,7 @@
     }
 }
 
-static void test_edgeclipper(skiatest::Reporter* reporter) {
+static void test_edgeclipper() {
     SkEdgeClipper clipper;
 
     const SkPoint pts[] = {
@@ -146,7 +146,7 @@
 
 static void TestClipper(skiatest::Reporter* reporter) {
     test_intersectline(reporter);
-    test_edgeclipper(reporter);
+    test_edgeclipper();
     test_hairclipping(reporter);
 }
 
diff --git a/tests/ColorTest.cpp b/tests/ColorTest.cpp
index 8985dbd..a720ff4 100644
--- a/tests/ColorTest.cpp
+++ b/tests/ColorTest.cpp
@@ -95,7 +95,7 @@
     return false;
 }
 
-static inline void test_565blend(skiatest::Reporter* reporter) {
+static inline void test_565blend() {
     int total_failures = 0;
     for (int global_alpha = 0; global_alpha <= 255; ++global_alpha) {
         int failures = 0;
@@ -182,7 +182,7 @@
     test_premul(reporter);
     //test_interp(reporter);
     test_fast_interp(reporter);
-//    test_565blend(reporter);
+//    test_565blend();
 }
 
 #include "TestClassDef.h"
diff --git a/tests/DeferredCanvasTest.cpp b/tests/DeferredCanvasTest.cpp
index a052c2e..a752c83 100644
--- a/tests/DeferredCanvasTest.cpp
+++ b/tests/DeferredCanvasTest.cpp
@@ -246,7 +246,7 @@
     virtual void prepareForDraw() SK_OVERRIDE {
         fPrepareForDrawCount++;
     }
-    virtual void storageAllocatedForRecordingChanged(size_t size) SK_OVERRIDE {
+    virtual void storageAllocatedForRecordingChanged(size_t) SK_OVERRIDE {
         fStorageAllocatedChangedCount++;
     }
     virtual void flushedDrawCommands() SK_OVERRIDE {
diff --git a/tests/DrawBitmapRectTest.cpp b/tests/DrawBitmapRectTest.cpp
index a56396c..ce33fcf 100644
--- a/tests/DrawBitmapRectTest.cpp
+++ b/tests/DrawBitmapRectTest.cpp
@@ -202,7 +202,7 @@
 
 ///////////////////////////////////////////////////////////////////////////////
 
-static void test_nan_antihair(skiatest::Reporter* reporter) {
+static void test_nan_antihair() {
     SkBitmap bm;
     bm.setConfig(SkBitmap::kARGB_8888_Config, 20, 20);
     bm.allocPixels();
@@ -264,7 +264,7 @@
     // ensure that we draw nothing if srcR does not intersect the bitmap
     REPORTER_ASSERT(reporter, check_for_all_zeros(dst));
 
-    test_nan_antihair(reporter);
+    test_nan_antihair();
     test_giantrepeat_crbug118018(reporter);
 
     test_treatAsSprite(reporter);
diff --git a/tests/DrawPathTest.cpp b/tests/DrawPathTest.cpp
index 3a238db..b791a9a 100644
--- a/tests/DrawPathTest.cpp
+++ b/tests/DrawPathTest.cpp
@@ -49,7 +49,7 @@
 
 // we're not calling this test anymore; is that for a reason?
 
-static void test_crbug131181(skiatest::Reporter*) {
+static void test_crbug131181() {
     /*
      fX = 18.8943768,
      fY = 129.121277
@@ -82,7 +82,7 @@
 // This used to assert in debug builds (and crash writing bad memory in release)
 // because we overflowed an intermediate value (B coefficient) setting up our
 // stepper for the quadratic. Now we bias that value by 1/2 so we don't overflow
-static void test_crbug_140803(skiatest::Reporter* reporter) {
+static void test_crbug_140803() {
     SkBitmap bm;
     bm.setConfig(SkBitmap::kARGB_8888_Config, 2700, 30*1024);
     bm.allocPixels();
@@ -101,7 +101,7 @@
 // of its bounds).
 // In the debug build, we used to assert in this case, until it was fixed.
 //
-static void test_inversepathwithclip(skiatest::Reporter* reporter) {
+static void test_inversepathwithclip() {
     SkPath path;
 
     path.moveTo(0, SkIntToScalar(20));
@@ -138,7 +138,7 @@
     canvas.get()->drawPath(path, paint);
 }
 
-static void test_bug533(skiatest::Reporter* reporter) {
+static void test_bug533() {
 #ifdef SK_SCALAR_IS_FLOAT
     /*
         http://code.google.com/p/skia/issues/detail?id=533
@@ -157,7 +157,7 @@
 #endif
 }
 
-static void test_crbug_140642(skiatest::Reporter* reporter) {
+static void test_crbug_140642() {
     /*
      *  We used to see this construct, and due to rounding as we accumulated
      *  our length, the loop where we apply the phase would run off the end of
@@ -179,7 +179,7 @@
 #endif
 }
 
-static void test_crbug_124652(skiatest::Reporter* reporter) {
+static void test_crbug_124652() {
 #ifdef SK_SCALAR_IS_FLOAT
     /*
         http://code.google.com/p/chromium/issues/detail?id=124652
@@ -192,7 +192,7 @@
 #endif
 }
 
-static void test_bigcubic(skiatest::Reporter* reporter) {
+static void test_bigcubic() {
 #ifdef SK_SCALAR_IS_FLOAT
     SkPath path;
     path.moveTo(64, 3);
@@ -209,7 +209,7 @@
 // we used to assert if the bounds of the device (clip) was larger than 32K
 // even when the path itself was smaller. We just draw and hope in the debug
 // version to not assert.
-static void test_giantaa(skiatest::Reporter* reporter) {
+static void test_giantaa() {
     const int W = 400;
     const int H = 400;
     SkAutoTUnref<SkCanvas> canvas(new_canvas(33000, 10));
@@ -265,15 +265,15 @@
 }
 
 static void TestDrawPath(skiatest::Reporter* reporter) {
-    test_giantaa(reporter);
-    test_bug533(reporter);
-    test_bigcubic(reporter);
-    test_crbug_124652(reporter);
-    test_crbug_140642(reporter);
-    test_crbug_140803(reporter);
-    test_inversepathwithclip(reporter);
+    test_giantaa();
+    test_bug533();
+    test_bigcubic();
+    test_crbug_124652();
+    test_crbug_140642();
+    test_crbug_140803();
+    test_inversepathwithclip();
     // why?
-    if (false) test_crbug131181(reporter);
+    if (false) test_crbug131181();
     test_infinite_dash(reporter);
     test_crbug_165432(reporter);
 }
diff --git a/tests/EmptyPathTest.cpp b/tests/EmptyPathTest.cpp
index be7d529..5c054ec 100644
--- a/tests/EmptyPathTest.cpp
+++ b/tests/EmptyPathTest.cpp
@@ -104,7 +104,7 @@
 #define CX  (SkIntToScalar(DIMENSION) / 2)
 #define CY  (SkIntToScalar(DIMENSION) / 2)
 
-static void make_empty(SkPath* path) {}
+static void make_empty(SkPath*) {}
 static void make_M(SkPath* path) { path->moveTo(CX, CY); }
 static void make_MM(SkPath* path) { path->moveTo(CX, CY); path->moveTo(CX, CY); }
 static void make_MZM(SkPath* path) { path->moveTo(CX, CY); path->close(); path->moveTo(CX, CY); }
diff --git a/tests/MemsetTest.cpp b/tests/MemsetTest.cpp
index ad1a21c..c799159 100644
--- a/tests/MemsetTest.cpp
+++ b/tests/MemsetTest.cpp
@@ -79,9 +79,10 @@
             uint16_t* base = &buffer[PAD + alignment];
             sk_memset16(base, VALUE16, count);
 
-            compare16(buffer,       0,       PAD + alignment);
-            compare16(base,         VALUE16, count);
-            compare16(base + count, 0,       TOTAL - count - PAD - alignment);
+            REPORTER_ASSERT(reporter,
+                compare16(buffer,       0,       PAD + alignment) &&
+                compare16(base,         VALUE16, count) &&
+                compare16(base + count, 0,       TOTAL - count - PAD - alignment));
         }
     }
 }
@@ -96,9 +97,10 @@
             uint32_t* base = &buffer[PAD + alignment];
             sk_memset32(base, VALUE32, count);
 
-            compare32(buffer,       0,       PAD + alignment);
-            compare32(base,         VALUE32, count);
-            compare32(base + count, 0,       TOTAL - count - PAD - alignment);
+            REPORTER_ASSERT(reporter,
+                compare32(buffer,       0,       PAD + alignment) &&
+                compare32(base,         VALUE32, count) &&
+                compare32(base + count, 0,       TOTAL - count - PAD - alignment));
         }
     }
 }
diff --git a/tests/PDFPrimitivesTest.cpp b/tests/PDFPrimitivesTest.cpp
index 6e7d616..9d52fcd 100644
--- a/tests/PDFPrimitivesTest.cpp
+++ b/tests/PDFPrimitivesTest.cpp
@@ -223,7 +223,7 @@
 // http://code.google.com/p/skia/issues/detail?id=1083.
 // SKP files might have invalid glyph ids. This test ensures they are ignored,
 // and there is no assert on input data in Debug mode.
-static void test_issue1083(skiatest::Reporter* reporter) {
+static void test_issue1083() {
     SkISize pageSize = SkISize::Make(100, 100);
     SkPDFDevice* dev = new SkPDFDevice(pageSize, pageSize, SkMatrix::I());
 
@@ -323,7 +323,7 @@
 
     TestSubstitute(reporter);
 
-    test_issue1083(reporter);
+    test_issue1083();
 }
 
 #include "TestClassDef.h"
diff --git a/tests/PathCoverageTest.cpp b/tests/PathCoverageTest.cpp
index 87ec908..97708bb 100644
--- a/tests/PathCoverageTest.cpp
+++ b/tests/PathCoverageTest.cpp
@@ -66,7 +66,7 @@
     }
 }
 
-static uint32_t quadraticPointCount_EE(const SkPoint points[], SkScalar tol) {
+static uint32_t quadraticPointCount_EE(const SkPoint points[]) {
     int distance = estimate_distance(points);
     return estimate_pointCount(distance);
 }
@@ -76,7 +76,7 @@
     return compute_pointCount(SkIntToScalar(distance), tol);
 }
 
-static uint32_t quadraticPointCount_CE(const SkPoint points[], SkScalar tol) {
+static uint32_t quadraticPointCount_CE(const SkPoint points[]) {
     SkScalar distance = compute_distance(points);
     return estimate_pointCount(SkScalarRound(distance));
 }
@@ -122,13 +122,13 @@
         uint32_t computedCount =
             quadraticPointCount_CC(path, SkIntToScalar(1));
         uint32_t estimatedCount =
-            quadraticPointCount_EE(path, SkIntToScalar(1));
+            quadraticPointCount_EE(path);
 
         if (false) { // avoid bit rot, suppress warning
             computedCount =
                     quadraticPointCount_EC(path, SkIntToScalar(1));
             estimatedCount =
-                    quadraticPointCount_CE(path, SkIntToScalar(1));
+                    quadraticPointCount_CE(path);
         }
         // Allow estimated to be high by a factor of two, but no less than
         // the computed value.
diff --git a/tests/PathMeasureTest.cpp b/tests/PathMeasureTest.cpp
index e8477c6..4c26bc1 100644
--- a/tests/PathMeasureTest.cpp
+++ b/tests/PathMeasureTest.cpp
@@ -8,7 +8,7 @@
 #include "Test.h"
 #include "SkPathMeasure.h"
 
-static void test_small_segment3(skiatest::Reporter* reporter) {
+static void test_small_segment3() {
 #ifdef SK_SCALAR_IS_FLOAT
     SkPath path;
     const SkPoint pts[] = {
@@ -27,7 +27,7 @@
 #endif
 }
 
-static void test_small_segment2(skiatest::Reporter* reporter) {
+static void test_small_segment2() {
 #ifdef SK_SCALAR_IS_FLOAT
     SkPath path;
     const SkPoint pts[] = {
@@ -45,7 +45,7 @@
 #endif
 }
 
-static void test_small_segment(skiatest::Reporter* reporter) {
+static void test_small_segment() {
 #ifdef SK_SCALAR_IS_FLOAT
     SkPath path;
     const SkPoint pts[] = {
@@ -203,9 +203,9 @@
     REPORTER_ASSERT(reporter, tangent.fX == -SK_Scalar1);
     REPORTER_ASSERT(reporter, tangent.fY == 0);
 
-    test_small_segment(reporter);
-    test_small_segment2(reporter);
-    test_small_segment3(reporter);
+    test_small_segment();
+    test_small_segment2();
+    test_small_segment3();
 }
 
 #include "TestClassDef.h"
diff --git a/tests/PathTest.cpp b/tests/PathTest.cpp
index 1714481..a52e540 100644
--- a/tests/PathTest.cpp
+++ b/tests/PathTest.cpp
@@ -119,7 +119,7 @@
 // This used to assert in the SK_DEBUG build, as the clip step would fail with
 // too-few interations in our cubic-line intersection code. That code now runs
 // 24 interations (instead of 16).
-static void test_crbug_170666(skiatest::Reporter* reporter) {
+static void test_crbug_170666() {
     SkPath path;
     SkPaint paint;
     paint.setAntiAlias(true);
@@ -175,7 +175,7 @@
     }
 }
 
-static void test_clipped_cubic(skiatest::Reporter* reporter) {
+static void test_clipped_cubic() {
     SkAutoTUnref<SkSurface> surface(new_surface(640, 480));
 
     // This path used to assert, because our cubic-chopping code incorrectly
@@ -197,7 +197,7 @@
 // which triggered an assert, from a tricky cubic. This test replicates that
 // example, so we can ensure that we handle it (in SkEdge.cpp), and don't
 // assert in the SK_DEBUG build.
-static void test_tricky_cubic(skiatest::Reporter* reporter) {
+static void test_tricky_cubic() {
     const SkPoint pts[] = {
         { SkDoubleToScalar(18.8943768),    SkDoubleToScalar(129.121277) },
         { SkDoubleToScalar(18.8937435),    SkDoubleToScalar(129.121689) },
@@ -411,7 +411,7 @@
 //  only have (at most) 1 close
 //
 static void test_poly(skiatest::Reporter* reporter, const SkPath& path,
-                      const SkPoint srcPts[], int count, bool expectClose) {
+                      const SkPoint srcPts[], bool expectClose) {
     SkPath::RawIter iter(path);
     SkPoint         pts[4];
 
@@ -463,7 +463,7 @@
         for (size_t count = 1; count <= SK_ARRAY_COUNT(pts); ++count) {
             SkPath path;
             path.addPoly(pts, count, SkToBool(doClose));
-            test_poly(reporter, path, pts, count, SkToBool(doClose));
+            test_poly(reporter, path, pts, SkToBool(doClose));
         }
     }
 }
@@ -2347,12 +2347,12 @@
     test_addPoly(reporter);
     test_isfinite(reporter);
     test_isfinite_after_transform(reporter);
-    test_tricky_cubic(reporter);
     test_arb_round_rect_is_convex(reporter);
     test_arb_zero_rad_round_rect_is_rect(reporter);
     test_addrect_isfinite(reporter);
-    test_clipped_cubic(reporter);
-    test_crbug_170666(reporter);
+    test_tricky_cubic();
+    test_clipped_cubic();
+    test_crbug_170666();
 }
 
 #include "TestClassDef.h"
diff --git a/tests/PictureTest.cpp b/tests/PictureTest.cpp
index f6a18c1..0a562cf 100644
--- a/tests/PictureTest.cpp
+++ b/tests/PictureTest.cpp
@@ -279,7 +279,7 @@
     }
 }
 
-static void test_peephole(skiatest::Reporter* reporter) {
+static void test_peephole() {
     SkRandom rand;
 
     for (int j = 0; j < 100; j++) {
@@ -424,7 +424,7 @@
 #else
     test_bad_bitmap();
 #endif
-    test_peephole(reporter);
+    test_peephole();
     test_gatherpixelrefs(reporter);
     test_bitmap_with_encoded_data(reporter);
     test_clone_empty(reporter);
diff --git a/tests/ReadPixelsTest.cpp b/tests/ReadPixelsTest.cpp
index bb1696d..edcb646 100644
--- a/tests/ReadPixelsTest.cpp
+++ b/tests/ReadPixelsTest.cpp
@@ -53,7 +53,7 @@
     return SkPremultiplyARGBInline(a, r, g, b);
 }
 
-SkPMColor getBitmapColor(int x, int y, int w, int h) {
+SkPMColor getBitmapColor(int x, int y, int w) {
     int n = y * w + x;
 
     U8CPU b = n & 0xff;
@@ -139,7 +139,7 @@
     for (int y = 0; y < h; ++y) {
         for (int x = 0; x < w; ++x) {
             SkPMColor* pixel = reinterpret_cast<SkPMColor*>(pixels + y * bitmap->rowBytes() + x * bitmap->bytesPerPixel());
-            *pixel = getBitmapColor(x, y, w, h);
+            *pixel = getBitmapColor(x, y, w);
         }
     }
 }
@@ -206,8 +206,8 @@
                     }
                 }
             } else if (checkBitmapPixels) {
-                REPORTER_ASSERT(reporter, getBitmapColor(bx, by, bw, bh) == pixel);
-                if (getBitmapColor(bx, by, bw, bh) != pixel) {
+                REPORTER_ASSERT(reporter, getBitmapColor(bx, by, bw) == pixel);
+                if (getBitmapColor(bx, by, bw) != pixel) {
                     return false;
                 }
             }
diff --git a/tests/TLSTest.cpp b/tests/TLSTest.cpp
index 38eb322..d31a09f 100644
--- a/tests/TLSTest.cpp
+++ b/tests/TLSTest.cpp
@@ -59,11 +59,11 @@
     return NULL;
 }
 
-static void FakeDeleteTLS(void* unused) {
+static void FakeDeleteTLS(void*) {
     sk_atomic_dec(&gCounter);
 }
 
-static void testTLSDestructor(void* unused) {
+static void testTLSDestructor(void*) {
     SkTLS::Get(FakeCreateTLS, FakeDeleteTLS);
 }
 
diff --git a/tests/TileGridTest.cpp b/tests/TileGridTest.cpp
index 8ff629c..5bca500 100644
--- a/tests/TileGridTest.cpp
+++ b/tests/TileGridTest.cpp
@@ -27,7 +27,7 @@
     MockCanvas(SkDevice* device) : SkCanvas(device)
     {}
 
-    virtual void drawRect(const SkRect& rect, const SkPaint& paint)
+    virtual void drawRect(const SkRect& rect, const SkPaint&)
     {
         // This capture occurs before quick reject.
         fRects.push(rect);
diff --git a/tests/WritePixelsTest.cpp b/tests/WritePixelsTest.cpp
index 73ffbc6..508e8e3 100644
--- a/tests/WritePixelsTest.cpp
+++ b/tests/WritePixelsTest.cpp
@@ -103,7 +103,7 @@
     return r32;
 }
 
-uint32_t getBitmapColor(int x, int y, int w, int h, SkCanvas::Config8888 config8888) {
+uint32_t getBitmapColor(int x, int y, int w, SkCanvas::Config8888 config8888) {
     int n = y * w + x;
     U8CPU b = n & 0xff;
     U8CPU g = (n >> 8) & 0xff;
@@ -250,7 +250,7 @@
             if (writeRect.contains(cx, cy)) {
                 int bx = cx - writeX;
                 int by = cy - writeY;
-                uint32_t bmpColor8888 = getBitmapColor(bx, by, bitmap.width(), bitmap.height(), config8888);
+                uint32_t bmpColor8888 = getBitmapColor(bx, by, bitmap.width(), config8888);
                 bool mul;
                 SkPMColor bmpPMColor = convertConfig8888ToPMColor(config8888, bmpColor8888, &mul);
                 bool check;
@@ -354,7 +354,7 @@
     for (int y = 0; y < h; ++y) {
         for (int x = 0; x < w; ++x) {
             uint32_t* pixel = reinterpret_cast<uint32_t*>(pixels + y * bitmap->rowBytes() + x * 4);
-            *pixel = getBitmapColor(x, y, w, h, config8888);
+            *pixel = getBitmapColor(x, y, w, config8888);
         }
     }
     return true;
diff --git a/tests/skia_test.cpp b/tests/skia_test.cpp
index e3df2d7..5d4af4c 100644
--- a/tests/skia_test.cpp
+++ b/tests/skia_test.cpp
@@ -74,7 +74,7 @@
     virtual void onReport(const char desc[], Reporter::Result result) {
         SkDebugf("\t%s: %s\n", result2string(result), desc);
     }
-    virtual void onEnd(Test* test) {
+    virtual void onEnd(Test*) {
         if (!this->getCurrSuccess()) {
             SkDebugf("---- FAILED\n");
         }