eliminate all warnings in non-thirdparty code on mac

Most of these issues were due to functions whose definitions appear in header files; I changed those functions to be 'static inline' instead of just 'static' or 'inline', which kills the warning for such functions.

Other functions that were static or anonymous-namespaced but were unused in cpp files were probably called at some point but are no longer; someone who knows more than I do should probably scrub all the functions I either deleted or #if 0'ed out and make sure that the right thing is happening here.

Lots of unused variables removed, and one nasty const issue handled.

There remains a single warning in thirdparty/externals/cityhash/src/city.cc on line 146 related to a signed/unsigned mismatch.  I don't know if we have control over this library so I didn't fix this one, but perhaps someone could do something about that one.

BUG=

Review URL: https://codereview.appspot.com/7067044

git-svn-id: http://skia.googlecode.com/svn/trunk@7051 2bbb7eff-a529-9590-31e7-b0007b416f81
diff --git a/tests/ClipStackTest.cpp b/tests/ClipStackTest.cpp
index d4391d7..4709d22 100644
--- a/tests/ClipStackTest.cpp
+++ b/tests/ClipStackTest.cpp
@@ -758,7 +758,7 @@
 }
 
 // This can assist with debugging the clip stack reduction code when the test below fails.
-static void print_clip(const SkClipStack::Element& element) {
+static inline void print_clip(const SkClipStack::Element& element) {
     static const char* kOpStrs[] = {
         "DF",
         "IS",
diff --git a/tests/ColorTest.cpp b/tests/ColorTest.cpp
index a038a06..8985dbd 100644
--- a/tests/ColorTest.cpp
+++ b/tests/ColorTest.cpp
@@ -16,7 +16,7 @@
 #define GetPackedG16As32(packed)    (SkGetPackedG16(dc) << (8 - SK_G16_BITS))
 #define GetPackedB16As32(packed)    (SkGetPackedB16(dc) << (8 - SK_B16_BITS))
 
-static bool S32A_D565_Blend_0(SkPMColor sc, uint16_t dc, U8CPU alpha) {
+static inline bool S32A_D565_Blend_0(SkPMColor sc, uint16_t dc, U8CPU alpha) {
     unsigned dst_scale = 255 - SkMulDiv255Round(SkGetPackedA32(sc), alpha);
     unsigned dr = SkMulS16(SkPacked32ToR16(sc), alpha) + SkMulS16(SkGetPackedR16(dc), dst_scale);
     unsigned dg = SkMulS16(SkPacked32ToG16(sc), alpha) + SkMulS16(SkGetPackedG16(dc), dst_scale);
@@ -30,7 +30,7 @@
     return false;
 }
 
-static bool S32A_D565_Blend_01(SkPMColor sc, uint16_t dc, U8CPU alpha) {
+static inline bool S32A_D565_Blend_01(SkPMColor sc, uint16_t dc, U8CPU alpha) {
     unsigned dst_scale = 255 - SkMulDiv255Round(SkGetPackedA32(sc), alpha);
     unsigned dr = SkMulS16(SkGetPackedR32(sc), alpha) + SkMulS16(SkGetPackedR16(dc) << 3, dst_scale);
     unsigned dg = SkMulS16(SkGetPackedG32(sc), alpha) + SkMulS16(SkGetPackedG16(dc) << 2, dst_scale);
@@ -44,7 +44,7 @@
     return false;
 }
 
-static bool S32A_D565_Blend_02(SkPMColor sc, uint16_t dc, U8CPU alpha) {
+static inline bool S32A_D565_Blend_02(SkPMColor sc, uint16_t dc, U8CPU alpha) {
     unsigned dst_scale = 255 - SkMulDiv255Round(SkGetPackedA32(sc), alpha);
     unsigned dr = SkMulS16(SkGetPackedR32(sc), alpha) + SkMulS16(GetPackedR16As32(dc), dst_scale);
     unsigned dg = SkMulS16(SkGetPackedG32(sc), alpha) + SkMulS16(GetPackedG16As32(dc), dst_scale);
@@ -62,7 +62,7 @@
     return false;
 }
 
-static bool S32A_D565_Blend_1(SkPMColor sc, uint16_t dc, U8CPU alpha) {
+static inline bool S32A_D565_Blend_1(SkPMColor sc, uint16_t dc, U8CPU alpha) {
     unsigned dst_scale = 255 - SkMulDiv255Round(SkGetPackedA32(sc), alpha);
     unsigned dr = (SkMulS16(SkGetPackedR32(sc), alpha) >> 3) + SkMulS16(SkGetPackedR16(dc), dst_scale);
     unsigned dg = (SkMulS16(SkGetPackedG32(sc), alpha) >> 2) + SkMulS16(SkGetPackedG16(dc), dst_scale);
@@ -76,11 +76,11 @@
     return false;
 }
 
-static int SkDiv65025Round(int x) {
+static inline int SkDiv65025Round(int x) {
     return (x + 65025/2) / 65025;
 //    return x / 65025;
 }
-static bool S32A_D565_Blend_2(SkPMColor sc, uint16_t dc, U8CPU alpha) {
+static inline bool S32A_D565_Blend_2(SkPMColor sc, uint16_t dc, U8CPU alpha) {
     unsigned dst_scale = 255*255 - SkGetPackedA32(sc) * alpha;
     alpha *= 255;
     unsigned dr = (SkGetPackedR32(sc) >> 3) * alpha + SkGetPackedR16(dc) * dst_scale;
@@ -95,7 +95,7 @@
     return false;
 }
 
-static void test_565blend(skiatest::Reporter* reporter) {
+static inline void test_565blend(skiatest::Reporter* reporter) {
     int total_failures = 0;
     for (int global_alpha = 0; global_alpha <= 255; ++global_alpha) {
         int failures = 0;
@@ -118,7 +118,7 @@
     SkDebugf("total failures %d\n", total_failures);
 }
 
-static void test_premul(skiatest::Reporter* reporter) {
+static inline void test_premul(skiatest::Reporter* reporter) {
     for (int a = 0; a <= 255; a++) {
         for (int x = 0; x <= 255; x++) {
             SkColor c0 = SkColorSetARGB(a, x, x, x);
@@ -162,7 +162,7 @@
 }
 */
 
-static void test_fast_interp(skiatest::Reporter* reporter) {
+static inline void test_fast_interp(skiatest::Reporter* reporter) {
     SkRandom r;
 
     U8CPU a0 = 0;
diff --git a/tests/DataRefTest.cpp b/tests/DataRefTest.cpp
index d6ba775..8c002c8 100644
--- a/tests/DataRefTest.cpp
+++ b/tests/DataRefTest.cpp
@@ -54,8 +54,8 @@
     SkDataSet::Iter iter(ds);
     int index = 0;
     for (; !iter.done(); iter.next()) {
-        const char* name = iter.key();
-        SkData* data = iter.value();
+//        const char* name = iter.key();
+//        SkData* data = iter.value();
 //        SkDebugf("[%d] %s:%s\n", index, name, (const char*)data->bytes());
         index += 1;
     }
diff --git a/tests/DrawPathTest.cpp b/tests/DrawPathTest.cpp
index e8cfa54..370559e 100644
--- a/tests/DrawPathTest.cpp
+++ b/tests/DrawPathTest.cpp
@@ -46,6 +46,9 @@
 //
 // http://code.google.com/p/chromium/issues/detail?id=131181
 //
+
+// we're not calling this test anymore; is that for a reason?
+
 static void test_crbug131181(skiatest::Reporter*) {
     /*
      fX = 18.8943768,
@@ -269,7 +272,8 @@
     test_crbug_140642(reporter);
     test_crbug_140803(reporter);
     test_inversepathwithclip(reporter);
-//    test_crbug131181(reporter);
+    // why?
+    if (false) test_crbug131181(reporter);
     test_infinite_dash(reporter);
     test_crbug_165432(reporter);
 }
diff --git a/tests/MathTest.cpp b/tests/MathTest.cpp
index c0babee..7fc53a9 100644
--- a/tests/MathTest.cpp
+++ b/tests/MathTest.cpp
@@ -591,7 +591,7 @@
     test_blend(reporter);
 #endif
 
-//    test_floor(reporter);
+    if (false) test_floor(reporter);
 
     // disable for now
     if (false) test_blend31();  // avoid bit rot, suppress warning
diff --git a/tests/TLSTest.cpp b/tests/TLSTest.cpp
index 17f7dcb..38eb322 100644
--- a/tests/TLSTest.cpp
+++ b/tests/TLSTest.cpp
@@ -71,7 +71,7 @@
     // TODO: Disabled for now to work around
     // http://code.google.com/p/skia/issues/detail?id=619
     // ('flaky segfault in TLS test on Shuttle_Ubuntu12 buildbots')
-    //test_threads(&thread_main);
+    if( false ) test_threads(&thread_main);
 
     // Test to ensure that at thread destruction, TLS destructors
     // have been called.