aboutsummaryrefslogtreecommitdiffhomepage
path: root/bench
diff options
context:
space:
mode:
authorGravatar humper@google.com <humper@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81>2013-01-07 16:47:43 +0000
committerGravatar humper@google.com <humper@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81>2013-01-07 16:47:43 +0000
commit05af1afd429808913683da75644e48bece12e820 (patch)
treeb7f0ec33f2cbbb9312deb9e0e566c8bea4a97320 /bench
parent30454293fd4fae81238c582c18232692bff32b1e (diff)
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
Diffstat (limited to 'bench')
-rw-r--r--bench/ChecksumBench.cpp2
-rw-r--r--bench/ChromeBench.cpp2
-rw-r--r--bench/Matrix44Bench.cpp6
-rw-r--r--bench/RTreeBench.cpp22
4 files changed, 16 insertions, 16 deletions
diff --git a/bench/ChecksumBench.cpp b/bench/ChecksumBench.cpp
index 818b9e367b..31160c7ad0 100644
--- a/bench/ChecksumBench.cpp
+++ b/bench/ChecksumBench.cpp
@@ -33,7 +33,7 @@ protected:
virtual void onDraw(SkCanvas* canvas) {
for (int i = 0; i < N; i++) {
- volatile uint32_t result = SkChecksum::Compute(fData, sizeof(fData));
+ (void) SkChecksum::Compute(fData, sizeof(fData));
}
}
diff --git a/bench/ChromeBench.cpp b/bench/ChromeBench.cpp
index f045573bea..ea5cb00878 100644
--- a/bench/ChromeBench.cpp
+++ b/bench/ChromeBench.cpp
@@ -491,7 +491,7 @@ private:
typedef SkBenchmark INHERITED;
};
-static SkBenchmark* ScrollGmailFactory(void* p) {
+static inline SkBenchmark* ScrollGmailFactory(void* p) {
return SkNEW_ARGS(ScrollGmailBench, (p));
}
diff --git a/bench/Matrix44Bench.cpp b/bench/Matrix44Bench.cpp
index 31525d265f..ce5d99de7b 100644
--- a/bench/Matrix44Bench.cpp
+++ b/bench/Matrix44Bench.cpp
@@ -48,9 +48,9 @@ public:
protected:
virtual void performTest() {
for (int i = 0; i < 10; ++i) {
- fM0 == fM1;
- fM1 == fM2;
- fM2 == fM0;
+ (void) (fM0 == fM1);
+ (void) (fM1 == fM2);
+ (void) (fM2 == fM0);
}
}
private:
diff --git a/bench/RTreeBench.cpp b/bench/RTreeBench.cpp
index e1885c3620..06853bbd2c 100644
--- a/bench/RTreeBench.cpp
+++ b/bench/RTreeBench.cpp
@@ -145,22 +145,22 @@ private:
typedef SkBenchmark INHERITED;
};
-static SkIRect make_simple_rect(SkRandom&, int index, int numRects) {
+static inline SkIRect make_simple_rect(SkRandom&, int index, int numRects) {
SkIRect out = {0, 0, GENERATE_EXTENTS, GENERATE_EXTENTS};
return out;
}
-static SkIRect make_concentric_rects_increasing(SkRandom&, int index, int numRects) {
+static inline SkIRect make_concentric_rects_increasing(SkRandom&, int index, int numRects) {
SkIRect out = {0, 0, index + 1, index + 1};
return out;
}
-static SkIRect make_concentric_rects_decreasing(SkRandom&, int index, int numRects) {
+static inline SkIRect make_concentric_rects_decreasing(SkRandom&, int index, int numRects) {
SkIRect out = {0, 0, numRects - index, numRects - index};
return out;
}
-static SkIRect make_point_rects(SkRandom& rand, int index, int numRects) {
+static inline SkIRect make_point_rects(SkRandom& rand, int index, int numRects) {
SkIRect out;
out.fLeft = rand.nextU() % GENERATE_EXTENTS;
out.fTop = rand.nextU() % GENERATE_EXTENTS;
@@ -169,7 +169,7 @@ static SkIRect make_point_rects(SkRandom& rand, int index, int numRects) {
return out;
}
-static SkIRect make_random_rects(SkRandom& rand, int index, int numRects) {
+static inline SkIRect make_random_rects(SkRandom& rand, int index, int numRects) {
SkIRect out;
out.fLeft = rand.nextS() % GENERATE_EXTENTS;
out.fTop = rand.nextS() % GENERATE_EXTENTS;
@@ -178,7 +178,7 @@ static SkIRect make_random_rects(SkRandom& rand, int index, int numRects) {
return out;
}
-static SkIRect make_large_rects(SkRandom& rand, int index, int numRects) {
+static inline SkIRect make_large_rects(SkRandom& rand, int index, int numRects) {
SkIRect out;
out.fLeft = rand.nextU() % GENERATE_EXTENTS;
out.fTop = rand.nextU() % GENERATE_EXTENTS;
@@ -189,23 +189,23 @@ static SkIRect make_large_rects(SkRandom& rand, int index, int numRects) {
///////////////////////////////////////////////////////////////////////////////
-static SkBenchmark* Fact0(void* p) {
+static inline SkBenchmark* Fact0(void* p) {
return SkNEW_ARGS(BBoxBuildBench, (p, "random", &make_random_rects, true,
SkRTree::Create(5, 16)));
}
-static SkBenchmark* Fact1(void* p) {
+static inline SkBenchmark* Fact1(void* p) {
return SkNEW_ARGS(BBoxBuildBench, (p, "random", &make_random_rects, false,
SkRTree::Create(5, 16)));
}
-static SkBenchmark* Fact2(void* p) {
+static inline SkBenchmark* Fact2(void* p) {
return SkNEW_ARGS(BBoxBuildBench, (p, "concentric",
&make_concentric_rects_increasing, true, SkRTree::Create(5, 16)));
}
-static SkBenchmark* Fact3(void* p) {
+static inline SkBenchmark* Fact3(void* p) {
return SkNEW_ARGS(BBoxQueryBench, (p, "random", &make_random_rects, true,
BBoxQueryBench::kRandom_QueryType, SkRTree::Create(5, 16)));
}
-static SkBenchmark* Fact4(void* p) {
+static inline SkBenchmark* Fact4(void* p) {
return SkNEW_ARGS(BBoxQueryBench, (p, "random", &make_random_rects, false,
BBoxQueryBench::kRandom_QueryType, SkRTree::Create(5, 16)));
}