Tests : Unused parameters cleanup
authorsugoi@google.com <sugoi@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81>
Wed, 27 Feb 2013 19:17:41 +0000 (19:17 +0000)
committersugoi@google.com <sugoi@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81>
Wed, 27 Feb 2013 19:17:41 +0000 (19:17 +0000)
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

20 files changed:
tests/AAClipTest.cpp
tests/BlitRowTest.cpp
tests/CanvasTest.cpp
tests/ClipperTest.cpp
tests/ColorTest.cpp
tests/DeferredCanvasTest.cpp
tests/DrawBitmapRectTest.cpp
tests/DrawPathTest.cpp
tests/EmptyPathTest.cpp
tests/MemsetTest.cpp
tests/PDFPrimitivesTest.cpp
tests/PathCoverageTest.cpp
tests/PathMeasureTest.cpp
tests/PathTest.cpp
tests/PictureTest.cpp
tests/ReadPixelsTest.cpp
tests/TLSTest.cpp
tests/TileGridTest.cpp
tests/WritePixelsTest.cpp
tests/skia_test.cpp

index 1b060a7d2da52f92b68a6297e29ced0e01176005..5c1d4e1720c4396fb9acce3097e1c625e808f506 100644 (file)
@@ -380,7 +380,7 @@ static void test_nearly_integral(skiatest::Reporter* reporter) {
     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 @@ static void TestAAClip(skiatest::Reporter* reporter) {
     test_irect(reporter);
     test_rgn(reporter);
     test_path_with_hole(reporter);
-    test_regressions(reporter);
+    test_regressions();
     test_nearly_integral(reporter);
 }
 
index fca4588282ce7c14bf55f93b0c64ca393210012e..c4a4134e65141fff33f912bcd36813520b3f1834 100644 (file)
@@ -59,7 +59,7 @@ static int proc_8(const void* ptr, int w, uint32_t expected, uint32_t* bad) {
     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;
 }
index 8c64d58e0d6f043d8e57070f867068926c46a7bd..006c855e532393490a383c28b5b9f93a7f039b39 100644 (file)
@@ -430,8 +430,8 @@ static void PaintSaveLayerStep(SkCanvas* canvas,
 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 @@ TEST_STEP(TwoClipOps, TwoClipOpsStep);
 // 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 @@ static void DrawNearlyZeroLengthPathTestStep(SkCanvas* canvas,
 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 @@ static void DrawVerticesShaderTestStep(SkCanvas* canvas,
 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 @@ static void DrawLayerTestStep(SkCanvas* canvas,
 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 @@ TEST_STEP(NestedSaveRestoreWithSolidPaint, \
     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
index b914374b9896c5844569e72af507ad10ceac2424..b4eee60c0191aaa951266d6844fdb94f5c768fcd 100644 (file)
@@ -48,7 +48,7 @@ static void test_hairclipping(skiatest::Reporter* reporter) {
     }
 }
 
-static void test_edgeclipper(skiatest::Reporter* reporter) {
+static void test_edgeclipper() {
     SkEdgeClipper clipper;
 
     const SkPoint pts[] = {
@@ -146,7 +146,7 @@ static void test_intersectline(skiatest::Reporter* reporter) {
 
 static void TestClipper(skiatest::Reporter* reporter) {
     test_intersectline(reporter);
-    test_edgeclipper(reporter);
+    test_edgeclipper();
     test_hairclipping(reporter);
 }
 
index 8985dbddbc29a1bcf338d6868eb9290e8616984f..a720ff4eac5bfe8f8861e74ce39bf33e47bafaed 100644 (file)
@@ -95,7 +95,7 @@ static inline bool S32A_D565_Blend_2(SkPMColor sc, uint16_t dc, U8CPU alpha) {
     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 @@ static void TestColor(skiatest::Reporter* reporter) {
     test_premul(reporter);
     //test_interp(reporter);
     test_fast_interp(reporter);
-//    test_565blend(reporter);
+//    test_565blend();
 }
 
 #include "TestClassDef.h"
index a052c2e6433577f8f97694b057ce2f280451e0bc..a752c8346e48e760dfb5121e200c2cb1870e2e65 100644 (file)
@@ -246,7 +246,7 @@ public:
     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 {
index a56396cc20b3bbfb50d72488c04aa1bf98f8e969..ce33fcf89d0479569b63d950a70184c6767d365b 100644 (file)
@@ -202,7 +202,7 @@ static void test_giantrepeat_crbug118018(skiatest::Reporter* reporter) {
 
 ///////////////////////////////////////////////////////////////////////////////
 
-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 @@ static void TestDrawBitmapRect(skiatest::Reporter* reporter) {
     // 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);
index 3a238db9c92479bca821b2486f89a27bae53d02a..b791a9a25cc6409385fb6e9c80263dd2bf7a5be9 100644 (file)
@@ -49,7 +49,7 @@ static void cubicToH(SkPath* path, const uint32_t raw[]) {
 
 // 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 @@ static void test_crbug131181(skiatest::Reporter*) {
 // 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 @@ static void test_crbug_140803(skiatest::Reporter* reporter) {
 // 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 @@ static void test_inversepathwithclip(skiatest::Reporter* reporter) {
     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 @@ static void test_bug533(skiatest::Reporter* reporter) {
 #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 @@ static void test_crbug_140642(skiatest::Reporter* reporter) {
 #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 @@ static void test_crbug_124652(skiatest::Reporter* reporter) {
 #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 @@ static void test_bigcubic(skiatest::Reporter* reporter) {
 // 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 test_crbug_165432(skiatest::Reporter* reporter) {
 }
 
 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);
 }
index be7d529d204a97aa4f8679d0d0c45523cf7fa71c..5c054ec16b36e69ccea0c0a2e053ebd9cd8e830e 100644 (file)
@@ -104,7 +104,7 @@ static void iter_paint(skiatest::Reporter* reporter, const SkPath& path, bool sh
 #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); }
index ad1a21c77c66c84b5348a8e3d72dcc6381303041..c79915989dccdd0b2378974c854c5f7d15d99c9e 100644 (file)
@@ -79,9 +79,10 @@ static void test_16(skiatest::Reporter* reporter) {
             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 @@ static void test_32(skiatest::Reporter* reporter) {
             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));
         }
     }
 }
index 6e7d61676decc081b140b90bbe21356984756ed7..9d52fcdc4994954be745a4798203840eaca93a26 100644 (file)
@@ -223,7 +223,7 @@ static void TestSubstitute(skiatest::Reporter* reporter) {
 // 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 @@ static void TestPDFPrimitives(skiatest::Reporter* reporter) {
 
     TestSubstitute(reporter);
 
-    test_issue1083(reporter);
+    test_issue1083();
 }
 
 #include "TestClassDef.h"
index 87ec908558224291e44a1482cf4279248b7357c5..97708bbc90dd3b825010344fd57bc9a1170a0fcd 100644 (file)
@@ -66,7 +66,7 @@ static inline uint32_t compute_pointCount(SkScalar d, SkScalar tol) {
     }
 }
 
-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 @@ static uint32_t quadraticPointCount_EC(const SkPoint points[], SkScalar tol) {
     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 @@ static bool one_d_pe(const int* array, const unsigned int count,
         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.
index e8477c6fdec5d4b0418654b712b6bf53de4c369f..4c26bc17cde12a51eeef998c02c96a83afb7fad1 100644 (file)
@@ -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 @@ static void test_small_segment3(skiatest::Reporter* reporter) {
 #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 @@ static void test_small_segment2(skiatest::Reporter* reporter) {
 #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 @@ static void TestPathMeasure(skiatest::Reporter* reporter) {
     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"
index 17144814b43aabd8699d1de06b00d7d2217590db..a52e540f48617171ad81684dfd7c78baf4efde07 100644 (file)
@@ -119,7 +119,7 @@ static void build_path_simple_170666(SkPath& path) {
 // 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 build_big_path(SkPath* path, bool reducedCase) {
     }
 }
 
-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 @@ static void test_clipped_cubic(skiatest::Reporter* reporter) {
 // 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 @@ static void test_isfinite(skiatest::Reporter* reporter) {
 //  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 @@ static void test_addPoly(skiatest::Reporter* reporter) {
         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 @@ static void TestPath(skiatest::Reporter* reporter) {
     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"
index f6a18c1948a36d29e454a15f482348f1552a3c81..0a562cf27b770a10fc360c8776e4089b8e49ad48 100644 (file)
@@ -279,7 +279,7 @@ static void rand_op(SkCanvas* canvas, SkRandom& rand) {
     }
 }
 
-static void test_peephole(skiatest::Reporter* reporter) {
+static void test_peephole() {
     SkRandom rand;
 
     for (int j = 0; j < 100; j++) {
@@ -424,7 +424,7 @@ static void TestPicture(skiatest::Reporter* reporter) {
 #else
     test_bad_bitmap();
 #endif
-    test_peephole(reporter);
+    test_peephole();
     test_gatherpixelrefs(reporter);
     test_bitmap_with_encoded_data(reporter);
     test_clone_empty(reporter);
index bb1696d93acc743fede8f9c7d49cadcfde553888..edcb6469c0a852660c5eeb845b167b87e95afee3 100644 (file)
@@ -53,7 +53,7 @@ SkPMColor getCanvasColor(int x, int y) {
     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 @@ void fillBitmap(SkBitmap* bitmap) {
     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 @@ bool checkRead(skiatest::Reporter* reporter,
                     }
                 }
             } 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;
                 }
             }
index 38eb32215aa1e8c7323344c998c97771140fe112..d31a09f1880e536e7805eca9968dd252e0498ca1 100644 (file)
@@ -59,11 +59,11 @@ static void* FakeCreateTLS() {
     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);
 }
 
index 8ff629c07ec255fda47781f5c6bc20d4f981e5e8..5bca500b5682269f39bff7f6b04d6c35f52af95c 100644 (file)
@@ -27,7 +27,7 @@ public:
     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);
index 73ffbc6dc9195e01b8dc4150cb400b43c7f8a20c..508e8e3cf6e6b721f648c419508141c2929da605 100644 (file)
@@ -103,7 +103,7 @@ uint32_t packConfig8888(SkCanvas::Config8888 config8888,
     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 @@ bool checkWrite(skiatest::Reporter* reporter,
             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 @@ bool setupBitmap(SkBitmap* bitmap,
     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;
index e3df2d71573d7d37c5dec1047e36282967139a74..5d4af4cfac6ecc4d5e26f01fc08404ff5ef8dd99 100644 (file)
@@ -74,7 +74,7 @@ protected:
     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");
         }