fix warnings on Mac in tests
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/6301045
git-svn-id: http://skia.googlecode.com/svn/trunk@4175 2bbb7eff-a529-9590-31e7-b0007b416f81
diff --git a/tests/CanvasTest.cpp b/tests/CanvasTest.cpp
index 899c34e..f35d05b 100644
--- a/tests/CanvasTest.cpp
+++ b/tests/CanvasTest.cpp
@@ -722,6 +722,7 @@
*/
}
+// unused
static void TestProxyCanvasStateConsistency(
skiatest::Reporter* reporter,
CanvasTestStep* testStep,
@@ -744,6 +745,7 @@
testStep);
}
+// unused
static void TestNWayCanvasStateConsistency(
skiatest::Reporter* reporter,
CanvasTestStep* testStep,
@@ -799,18 +801,26 @@
SkPicture::kFlattenMutableNonTexturePixelRefs_RecordingFlag);
TestDeferredCanvasStateConsistency(reporter, testStep, referenceCanvas);
- // The following test code is commented out because SkProxyCanvas is
+ // The following test code is disabled because SkProxyCanvas is
// missing a lot of virtual overrides on get* methods, which are used
// to verify canvas state.
// Issue: http://code.google.com/p/skia/issues/detail?id=500
-
- //TestProxyCanvasStateConsistency(reporter, testStep, referenceCanvas);
- // The following test code is commented out because SkNWayCanvas does not
+ if (false) { // avoid bit rot, suppress warning
+ TestProxyCanvasStateConsistency(reporter, testStep, referenceCanvas);
+ }
+
+ // The following test code is disabled because SkNWayCanvas does not
// report correct clipping and device bounds information
// Issue: http://code.google.com/p/skia/issues/detail?id=501
+
+ if (false) { // avoid bit rot, suppress warning
+ TestNWayCanvasStateConsistency(reporter, testStep, referenceCanvas);
+ }
- //TestNWayCanvasStateConsistency(reporter, testStep, referenceCanvas);
+ if (false) { // avoid bit rot, suppress warning
+ test_clipVisitor(reporter, &referenceCanvas);
+ }
}
static void TestCanvas(skiatest::Reporter* reporter) {