diff --git a/tests/BitmapCopyTest.cpp b/tests/BitmapCopyTest.cpp
index 27a145e..690497a 100644
--- a/tests/BitmapCopyTest.cpp
+++ b/tests/BitmapCopyTest.cpp
@@ -80,7 +80,7 @@
     }
 }
 
-SkColorTable* init_ctable() {
+static SkColorTable* init_ctable() {
     static const SkColor colors[] = {
         SK_ColorBLACK, SK_ColorRED, SK_ColorGREEN, SK_ColorBLUE, SK_ColorWHITE
     };
@@ -102,7 +102,7 @@
 
 // Utility function to read the value of a given pixel in bm. All
 // values converted to uint32_t for simplification of comparisons.
-uint32_t getPixel(int x, int y, const SkBitmap& bm) {
+static uint32_t getPixel(int x, int y, const SkBitmap& bm) {
     uint32_t val = 0;
     uint16_t val16;
     uint8_t val8, shift;
@@ -137,7 +137,7 @@
 // Utility function to set value of any pixel in bm.
 // bm.getConfig() specifies what format 'val' must be
 // converted to, but at present uint32_t can handle all formats.
-void setPixel(int x, int y, uint32_t val, SkBitmap& bm) {
+static void setPixel(int x, int y, uint32_t val, SkBitmap& bm) {
     uint16_t val16;
     uint8_t val8, shift;
     SkAutoLockPixels lock(bm);
@@ -174,7 +174,7 @@
 
 // Utility to return string containing name of each format, to
 // simplify diagnostic output.
-const char* getSkConfigName(const SkBitmap& bm) {
+static const char* getSkConfigName(const SkBitmap& bm) {
     switch (bm.getConfig()) {
         case SkBitmap::kNo_Config: return "SkBitmap::kNo_Config";
         case SkBitmap::kA1_Config: return "SkBitmap::kA1_Config";
@@ -211,7 +211,7 @@
 // A function to verify that two bitmaps contain the same pixel values
 // at all coordinates indicated by coords. Simplifies verification of
 // copied bitmaps.
-void reportCopyVerification(const SkBitmap& bm1, const SkBitmap& bm2,
+static void reportCopyVerification(const SkBitmap& bm1, const SkBitmap& bm2,
                             Coordinates& coords,
                             const char* msg,
                             skiatest::Reporter* reporter){
@@ -232,7 +232,7 @@
 }
 
 // Writes unique pixel values at locations specified by coords.
-void writeCoordPixels(SkBitmap& bm, const Coordinates& coords) {
+static void writeCoordPixels(SkBitmap& bm, const Coordinates& coords) {
     for (int i = 0; i < coords.length; ++i)
         setPixel(coords[i]->fX, coords[i]->fY, i, bm);
 }
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) {
diff --git a/tests/ClipCacheTest.cpp b/tests/ClipCacheTest.cpp
index a0888d8..ae3337e 100644
--- a/tests/ClipCacheTest.cpp
+++ b/tests/ClipCacheTest.cpp
@@ -13,6 +13,7 @@
 static const int Y_SIZE = 12;
 
 ////////////////////////////////////////////////////////////////////////////////
+// note: this is unused
 static GrTexture* createTexture(GrContext* context) {
     unsigned char textureData[X_SIZE][Y_SIZE][4];
 
@@ -59,6 +60,9 @@
 //  push, pop, set, canReuse & getters
 static void test_cache(skiatest::Reporter* reporter, GrContext* context) {
 
+    if (false) { // avoid bit rot, suppress warning
+        createTexture(context); 
+    }
     GrClipMaskCache cache;
 
     cache.setContext(context);
diff --git a/tests/ClipperTest.cpp b/tests/ClipperTest.cpp
index d739d31..724ff56 100644
--- a/tests/ClipperTest.cpp
+++ b/tests/ClipperTest.cpp
@@ -22,8 +22,8 @@
 
     SkCanvas canvas(bm);
     canvas.clipRect(SkRect::MakeWH(SkIntToScalar(4), SkIntToScalar(2)));
-    canvas.drawLine(SkFloatToScalar(1.5), SkFloatToScalar(1.5),
-                    SkFloatToScalar(3.5), SkFloatToScalar(3.5), paint);
+    canvas.drawLine(SkFloatToScalar(1.5f), SkFloatToScalar(1.5f),
+                    SkFloatToScalar(3.5f), SkFloatToScalar(3.5f), paint);
     
     /**
      *  We had a bug where we misinterpreted the bottom of the clip, and
@@ -144,7 +144,7 @@
     
 }
 
-void TestClipper(skiatest::Reporter* reporter) {
+static void TestClipper(skiatest::Reporter* reporter) {
     test_intersectline(reporter);
     test_edgeclipper(reporter);
     test_hairclipping(reporter);
diff --git a/tests/DataRefTest.cpp b/tests/DataRefTest.cpp
index 6a42485..56c5d11 100644
--- a/tests/DataRefTest.cpp
+++ b/tests/DataRefTest.cpp
@@ -26,7 +26,7 @@
     REPORTER_ASSERT(reporter, !memcmp(ref->data(), data, len));
 }
 
-void TestDataRef(skiatest::Reporter* reporter) {
+static void TestDataRef(skiatest::Reporter* reporter) {
     const char* str = "We the people, in order to form a more perfect union.";
     const int N = 10;
 
diff --git a/tests/EmptyPathTest.cpp b/tests/EmptyPathTest.cpp
index b126076..4cff190 100644
--- a/tests/EmptyPathTest.cpp
+++ b/tests/EmptyPathTest.cpp
@@ -39,7 +39,7 @@
     size_t count = DIMENSION * DIMENSION;
     const SkPMColor* ptr = bm.getAddr32(0, 0);
 
-    SkPMColor andValue = ~0;
+    SkPMColor andValue = ~0U;
     SkPMColor orValue = 0;
     for (size_t i = 0; i < count; ++i) {
         SkPMColor c = ptr[i];
diff --git a/tests/FillPathTest.cpp b/tests/FillPathTest.cpp
index b14f5bc..22ceb19 100644
--- a/tests/FillPathTest.cpp
+++ b/tests/FillPathTest.cpp
@@ -38,9 +38,9 @@
   int width  = 200;
   int expected_lines = 5;
   clip.set(0, height - expected_lines, width, height);
-  path.moveTo(0.0, 0.0);
+  path.moveTo(0.0f, 0.0f);
   path.quadTo(SkIntToScalar(width/2), SkIntToScalar(height),
-              SkIntToScalar(width), 0.0);
+              SkIntToScalar(width), 0.0f);
   path.close();
   path.setFillType(SkPath::kInverseWinding_FillType);
   SkScan::FillPath(path, clip, &blitter);
diff --git a/tests/FontHostTest.cpp b/tests/FontHostTest.cpp
index 234d177..e35e73f 100644
--- a/tests/FontHostTest.cpp
+++ b/tests/FontHostTest.cpp
@@ -26,6 +26,9 @@
 
 static void test_tables(skiatest::Reporter* reporter, SkTypeface* face) {
     SkFontID fontID = face->uniqueID();
+    if (false) { // avoid bit rot, suppress warning
+        REPORTER_ASSERT(reporter, fontID);
+    }
 
     int count = face->countTables();
 
diff --git a/tests/GeometryTest.cpp b/tests/GeometryTest.cpp
index 9a0f78f..12cc816 100644
--- a/tests/GeometryTest.cpp
+++ b/tests/GeometryTest.cpp
@@ -28,6 +28,9 @@
     SkScalar tValues[3];
     // make sure we don't assert internally
     int count = SkChopCubicAtMaxCurvature(src, dst, tValues);
+    if (false) { // avoid bit rot, suppress warning
+        REPORTER_ASSERT(reporter, count);
+    }
 }
 
 
diff --git a/tests/MathTest.cpp b/tests/MathTest.cpp
index a7ecfa1..3deb79a 100644
--- a/tests/MathTest.cpp
+++ b/tests/MathTest.cpp
@@ -73,9 +73,20 @@
     return dst + ((src - dst) * a31 >> 5);
 }
 
+// suppress unused code warning
+static int (*blend_functions[])(int, int, int) = {
+    blend31,
+    blend31_slow,
+    blend31_round,
+    blend31_old
+};
+
 static void test_blend31() {
     int failed = 0;
     int death = 0;
+    if (false) { // avoid bit rot, suppress warning
+        failed = (*blend_functions[0])(0,0,0);
+    }
     for (int src = 0; src <= 255; src++) {
         for (int dst = 0; dst <= 255; dst++) {
             for (int a = 0; a <= 31; a++) {
@@ -599,7 +610,7 @@
 #endif
 
     // disable for now
-//    test_blend31();
+    if (false) test_blend31();  // avoid bit rot, suppress warning
 }
 
 #include "TestClassDef.h"
diff --git a/tests/Matrix44Test.cpp b/tests/Matrix44Test.cpp
index 9846e7d..9e589e6 100644
--- a/tests/Matrix44Test.cpp
+++ b/tests/Matrix44Test.cpp
@@ -76,7 +76,7 @@
     }
 }
 
-void TestMatrix44(skiatest::Reporter* reporter) {
+static void TestMatrix44(skiatest::Reporter* reporter) {
 #ifdef SK_SCALAR_IS_FLOAT
     SkMatrix44 mat, inverse, iden1, iden2, rot;
 
@@ -139,9 +139,9 @@
                         0, 0, 0, 1);
     }
 
-#if 0   // working on making this pass
-    test_common_angles(reporter);
-#endif
+    if (false) { // avoid bit rot, suppress warning (working on making this pass)
+        test_common_angles(reporter);
+    }
 #endif
 }
 
diff --git a/tests/MatrixTest.cpp b/tests/MatrixTest.cpp
index 6cf9006..979f6ce 100644
--- a/tests/MatrixTest.cpp
+++ b/tests/MatrixTest.cpp
@@ -100,7 +100,7 @@
     REPORTER_ASSERT(reporter, memcmp(buffer, buffer2, size1) == 0);
 }
 
-void test_matrix_max_stretch(skiatest::Reporter* reporter) {
+static void test_matrix_max_stretch(skiatest::Reporter* reporter) {
     SkMatrix identity;
     identity.reset();
     REPORTER_ASSERT(reporter, SK_Scalar1 == identity.getMaxStretch());
@@ -218,7 +218,7 @@
                 SkScalarSquare(tol));
 }
 
-void test_matrix_is_similarity_transform(skiatest::Reporter* reporter) {
+static void test_matrix_is_similarity_transform(skiatest::Reporter* reporter) {
     SkMatrix mat;
 
     // identity
@@ -347,7 +347,7 @@
     REPORTER_ASSERT(reporter, isSimilarityTransformation(mat));
 }
 
-void TestMatrix(skiatest::Reporter* reporter) {
+static void TestMatrix(skiatest::Reporter* reporter) {
     SkMatrix    mat, inverse, iden1, iden2;
 
     mat.reset();
diff --git a/tests/PDFPrimitivesTest.cpp b/tests/PDFPrimitivesTest.cpp
index 000ebea..2423d56 100644
--- a/tests/PDFPrimitivesTest.cpp
+++ b/tests/PDFPrimitivesTest.cpp
@@ -240,7 +240,7 @@
     SimpleCheckObjectOutput(reporter, realHalf.get(), "0.5");
 
 #if defined(SK_SCALAR_IS_FLOAT)
-    SkRefPtr<SkPDFScalar> bigScalar = new SkPDFScalar(110999.75);
+    SkRefPtr<SkPDFScalar> bigScalar = new SkPDFScalar(110999.75f);
     bigScalar->unref();  // SkRefPtr and new both took a reference.
 #if !defined(SK_ALLOW_LARGE_PDF_SCALARS)
     SimpleCheckObjectOutput(reporter, bigScalar.get(), "111000");
diff --git a/tests/ParsePathTest.cpp b/tests/ParsePathTest.cpp
index 831cd8e..116dbd0 100644
--- a/tests/ParsePathTest.cpp
+++ b/tests/ParsePathTest.cpp
@@ -27,18 +27,18 @@
 #endif
 }
 
+static struct {
+    const char* fStr;
+    const SkRect fBounds;
+} gRec[] = {
+    { "", { 0, 0, 0, 0 } },
+    { "M0,0L10,10", { 0, 0, SkIntToScalar(10), SkIntToScalar(10) } },
+    { "M-5.5,-0.5 Q 0 0 6,6.50",
+        { SkFloatToScalar(-5.5f), SkFloatToScalar(-0.5f),
+          SkFloatToScalar(6), SkFloatToScalar(6.5f) } }
+};
+
 static void TestParsePath(skiatest::Reporter* reporter) {
-    static const struct {
-        const char* fStr;
-        SkRect      fBounds;
-    } gRec[] = {
-        { "", { 0, 0, 0, 0 } },
-        { "M0,0L10,10", { 0, 0, SkIntToScalar(10), SkIntToScalar(10) } },
-        { "M-5.5,-0.5 Q 0 0 6,6.50",
-            { SkFloatToScalar(-5.5f), SkFloatToScalar(-0.5f),
-              SkFloatToScalar(6), SkFloatToScalar(6.5f) } }
-    };
-    
     for (size_t i = 0; i < SK_ARRAY_COUNT(gRec); i++) {
         SkPath  path;
         bool success = SkParsePath::FromSVGString(gRec[i].fStr, &path);
@@ -51,13 +51,13 @@
     }
     
     SkRect r;
-    r.set(0, 0, SkFloatToScalar(10), SkFloatToScalar(10.5));
+    r.set(0, 0, SkFloatToScalar(10), SkFloatToScalar(10.5f));
     SkPath p;
     p.addRect(r);
     test_to_from(reporter, p);
     p.addOval(r);
     test_to_from(reporter, p);
-    p.addRoundRect(r, SkFloatToScalar(4), SkFloatToScalar(4.5));
+    p.addRoundRect(r, SkFloatToScalar(4), SkFloatToScalar(4.5f));
     test_to_from(reporter, p);
 }
 
diff --git a/tests/PathCoverageTest.cpp b/tests/PathCoverageTest.cpp
index 4f2f1be..9734f75 100644
--- a/tests/PathCoverageTest.cpp
+++ b/tests/PathCoverageTest.cpp
@@ -66,22 +66,22 @@
     }
 }
 
-uint32_t quadraticPointCount_EE(const SkPoint points[], SkScalar tol) {
+static uint32_t quadraticPointCount_EE(const SkPoint points[], SkScalar tol) {
     int distance = estimate_distance(points);
     return estimate_pointCount(distance);
 }
 
-uint32_t quadraticPointCount_EC(const SkPoint points[], SkScalar tol) {
+static uint32_t quadraticPointCount_EC(const SkPoint points[], SkScalar tol) {
     int distance = estimate_distance(points);
     return compute_pointCount(SkIntToScalar(distance), tol);
 }
 
-uint32_t quadraticPointCount_CE(const SkPoint points[], SkScalar tol) {
+static uint32_t quadraticPointCount_CE(const SkPoint points[], SkScalar tol) {
     SkScalar distance = compute_distance(points);
     return estimate_pointCount(SkScalarRound(distance));
 }
 
-uint32_t quadraticPointCount_CC(const SkPoint points[], SkScalar tol) {
+static uint32_t quadraticPointCount_CC(const SkPoint points[], SkScalar tol) {
     SkScalar distance = compute_distance(points);
     return compute_pointCount(distance, tol);
 }
@@ -123,6 +123,13 @@
             quadraticPointCount_CC(path, SkIntToScalar(1));
         uint32_t estimatedCount =
             quadraticPointCount_EE(path, SkIntToScalar(1));
+        
+        if (false) { // avoid bit rot, suppress warning
+            computedCount =
+                    quadraticPointCount_EC(path, SkIntToScalar(1));
+            estimatedCount =
+                    quadraticPointCount_CE(path, SkIntToScalar(1));
+        }
         // Allow estimated to be high by a factor of two, but no less than
         // the computed value.
         bool isAccurate = (estimatedCount >= computedCount) &&
diff --git a/tests/PathTest.cpp b/tests/PathTest.cpp
index 73bdef0..9d9903f 100644
--- a/tests/PathTest.cpp
+++ b/tests/PathTest.cpp
@@ -1375,7 +1375,7 @@
     REPORTER_ASSERT(reporter, path.isOval(NULL));
 }
 
-void TestPath(skiatest::Reporter* reporter) {
+static void TestPath(skiatest::Reporter* reporter) {
     {
         SkSize size;
         size.fWidth = 3.4f;
diff --git a/tests/PointTest.cpp b/tests/PointTest.cpp
index db9c803..efae223 100644
--- a/tests/PointTest.cpp
+++ b/tests/PointTest.cpp
@@ -34,7 +34,7 @@
     REPORTER_ASSERT(reporter, SkScalarNearlyEqual(newLength, SK_Scalar1));
 }
 
-void PointTest(skiatest::Reporter* reporter) {
+static void PointTest(skiatest::Reporter* reporter) {
     test_length(reporter, SkIntToScalar(3), SkIntToScalar(4), SkIntToScalar(5));
     test_length(reporter, SkFloatToScalar(0.6f), SkFloatToScalar(0.8f),
                 SK_Scalar1);
diff --git a/tests/ReadWriteAlphaTest.cpp b/tests/ReadWriteAlphaTest.cpp
index 4b3f671..536d0c5 100644
--- a/tests/ReadWriteAlphaTest.cpp
+++ b/tests/ReadWriteAlphaTest.cpp
@@ -12,7 +12,7 @@
 static const int X_SIZE = 12;
 static const int Y_SIZE = 12;
 
-void ReadWriteAlphaTest(skiatest::Reporter* reporter, GrContext* context) {
+static void ReadWriteAlphaTest(skiatest::Reporter* reporter, GrContext* context) {
 
 #if SK_SCALAR_IS_FIXED
     // GPU device known not to work in the fixed pt build.
diff --git a/tests/SortTest.cpp b/tests/SortTest.cpp
index 166cff2..4a5631d 100644
--- a/tests/SortTest.cpp
+++ b/tests/SortTest.cpp
@@ -10,7 +10,7 @@
 #include "SkTSort.h"
 
 extern "C" {
-    int compare_int(const void* a, const void* b) {
+    static int compare_int(const void* a, const void* b) {
         return *(const int*)a - *(const int*)b;
     }
 }
@@ -44,6 +44,9 @@
         SkTHeapSort<int>(array, count);
         check_sort(reporter, "Heap", array, count);
     }
+    if (false) { // avoid bit rot, suppress warning
+        compare_int(array, array);
+    }
 }
 
 // need tests for SkStrSearch
diff --git a/tests/StringTest.cpp b/tests/StringTest.cpp
index ebf7006..08bd280 100644
--- a/tests/StringTest.cpp
+++ b/tests/StringTest.cpp
@@ -28,7 +28,7 @@
         va_end(args);                               \
     } while (0)
 
-void printfAnalog(char* buffer, int size, const char format[], ...) {
+static void printfAnalog(char* buffer, int size, const char format[], ...) {
     ARGS_TO_BUFFER(format, buffer, size);
 }
 
diff --git a/tests/XfermodeTest.cpp b/tests/XfermodeTest.cpp
index 966da51..a851b29 100644
--- a/tests/XfermodeTest.cpp
+++ b/tests/XfermodeTest.cpp
@@ -9,7 +9,7 @@
 #include "SkColor.h"
 #include "SkXfermode.h"
 
-SkPMColor bogusXfermodeProc(SkPMColor src, SkPMColor dst) {
+static SkPMColor bogusXfermodeProc(SkPMColor src, SkPMColor dst) {
     return 42;
 }
 
