aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorGravatar sugoi@google.com <sugoi@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81>2013-02-27 19:17:41 +0000
committerGravatar sugoi@google.com <sugoi@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81>2013-02-27 19:17:41 +0000
commit54f0d1b7113cb0dc184e522539aab1030a28a421 (patch)
tree034f4823f8b9ed4ca84d28cbaa08de582edea4c5
parent4e0d96b6558f0360993e3ecbe0975017a195d4f2 (diff)
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
-rw-r--r--tests/AAClipTest.cpp4
-rw-r--r--tests/BlitRowTest.cpp2
-rw-r--r--tests/CanvasTest.cpp24
-rw-r--r--tests/ClipperTest.cpp4
-rw-r--r--tests/ColorTest.cpp4
-rw-r--r--tests/DeferredCanvasTest.cpp2
-rw-r--r--tests/DrawBitmapRectTest.cpp4
-rw-r--r--tests/DrawPathTest.cpp32
-rw-r--r--tests/EmptyPathTest.cpp2
-rw-r--r--tests/MemsetTest.cpp14
-rw-r--r--tests/PDFPrimitivesTest.cpp4
-rw-r--r--tests/PathCoverageTest.cpp8
-rw-r--r--tests/PathMeasureTest.cpp12
-rw-r--r--tests/PathTest.cpp16
-rw-r--r--tests/PictureTest.cpp4
-rw-r--r--tests/ReadPixelsTest.cpp8
-rw-r--r--tests/TLSTest.cpp4
-rw-r--r--tests/TileGridTest.cpp2
-rw-r--r--tests/WritePixelsTest.cpp6
-rw-r--r--tests/skia_test.cpp2
20 files changed, 80 insertions, 78 deletions
diff --git a/tests/AAClipTest.cpp b/tests/AAClipTest.cpp
index 1b060a7d2d..5c1d4e1720 100644
--- a/tests/AAClipTest.cpp
+++ b/tests/AAClipTest.cpp
@@ -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);
}
diff --git a/tests/BlitRowTest.cpp b/tests/BlitRowTest.cpp
index fca4588282..c4a4134e65 100644
--- a/tests/BlitRowTest.cpp
+++ b/tests/BlitRowTest.cpp
@@ -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;
}
diff --git a/tests/CanvasTest.cpp b/tests/CanvasTest.cpp
index 8c64d58e0d..006c855e53 100644
--- a/tests/CanvasTest.cpp
+++ b/tests/CanvasTest.cpp
@@ -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
diff --git a/tests/ClipperTest.cpp b/tests/ClipperTest.cpp
index b914374b98..b4eee60c01 100644
--- a/tests/ClipperTest.cpp
+++ b/tests/ClipperTest.cpp
@@ -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);
}
diff --git a/tests/ColorTest.cpp b/tests/ColorTest.cpp
index 8985dbddbc..a720ff4eac 100644
--- a/tests/ColorTest.cpp
+++ b/tests/ColorTest.cpp
@@ -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"
diff --git a/tests/DeferredCanvasTest.cpp b/tests/DeferredCanvasTest.cpp
index a052c2e643..a752c8346e 100644
--- a/tests/DeferredCanvasTest.cpp
+++ b/tests/DeferredCanvasTest.cpp
@@ -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 {
diff --git a/tests/DrawBitmapRectTest.cpp b/tests/DrawBitmapRectTest.cpp
index a56396cc20..ce33fcf89d 100644
--- a/tests/DrawBitmapRectTest.cpp
+++ b/tests/DrawBitmapRectTest.cpp
@@ -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);
diff --git a/tests/DrawPathTest.cpp b/tests/DrawPathTest.cpp
index 3a238db9c9..b791a9a25c 100644
--- a/tests/DrawPathTest.cpp
+++ b/tests/DrawPathTest.cpp
@@ -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);
}
diff --git a/tests/EmptyPathTest.cpp b/tests/EmptyPathTest.cpp
index be7d529d20..5c054ec16b 100644
--- a/tests/EmptyPathTest.cpp
+++ b/tests/EmptyPathTest.cpp
@@ -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); }
diff --git a/tests/MemsetTest.cpp b/tests/MemsetTest.cpp
index ad1a21c77c..c79915989d 100644
--- a/tests/MemsetTest.cpp
+++ b/tests/MemsetTest.cpp
@@ -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));
}
}
}
diff --git a/tests/PDFPrimitivesTest.cpp b/tests/PDFPrimitivesTest.cpp
index 6e7d61676d..9d52fcdc49 100644
--- a/tests/PDFPrimitivesTest.cpp
+++ b/tests/PDFPrimitivesTest.cpp
@@ -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"
diff --git a/tests/PathCoverageTest.cpp b/tests/PathCoverageTest.cpp
index 87ec908558..97708bbc90 100644
--- a/tests/PathCoverageTest.cpp
+++ b/tests/PathCoverageTest.cpp
@@ -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.
diff --git a/tests/PathMeasureTest.cpp b/tests/PathMeasureTest.cpp
index e8477c6fde..4c26bc17cd 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 @@ 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"
diff --git a/tests/PathTest.cpp b/tests/PathTest.cpp
index 17144814b4..a52e540f48 100644
--- a/tests/PathTest.cpp
+++ b/tests/PathTest.cpp
@@ -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"
diff --git a/tests/PictureTest.cpp b/tests/PictureTest.cpp
index f6a18c1948..0a562cf27b 100644
--- a/tests/PictureTest.cpp
+++ b/tests/PictureTest.cpp
@@ -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);
diff --git a/tests/ReadPixelsTest.cpp b/tests/ReadPixelsTest.cpp
index bb1696d93a..edcb6469c0 100644
--- a/tests/ReadPixelsTest.cpp
+++ b/tests/ReadPixelsTest.cpp
@@ -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;
}
}
diff --git a/tests/TLSTest.cpp b/tests/TLSTest.cpp
index 38eb32215a..d31a09f188 100644
--- a/tests/TLSTest.cpp
+++ b/tests/TLSTest.cpp
@@ -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);
}
diff --git a/tests/TileGridTest.cpp b/tests/TileGridTest.cpp
index 8ff629c07e..5bca500b56 100644
--- a/tests/TileGridTest.cpp
+++ b/tests/TileGridTest.cpp
@@ -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);
diff --git a/tests/WritePixelsTest.cpp b/tests/WritePixelsTest.cpp
index 73ffbc6dc9..508e8e3cf6 100644
--- a/tests/WritePixelsTest.cpp
+++ b/tests/WritePixelsTest.cpp
@@ -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;
diff --git a/tests/skia_test.cpp b/tests/skia_test.cpp
index e3df2d7157..5d4af4cfac 100644
--- a/tests/skia_test.cpp
+++ b/tests/skia_test.cpp
@@ -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");
}