diff options
author | caryclark@google.com <caryclark@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81> | 2012-06-06 12:11:45 +0000 |
---|---|---|
committer | caryclark@google.com <caryclark@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81> | 2012-06-06 12:11:45 +0000 |
commit | 19069a28225356bc24a5df7ad03c4d4ac5c532cb (patch) | |
tree | aa3bf0dc543ad71eb69370d0aee6e0d9f453b2c1 /bench/MathBench.cpp | |
parent | 9da0cea3a32e274ad8b40174a25e5f8c532fbd9b (diff) |
fix warnings on Mac in bench
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/6302044
git-svn-id: http://skia.googlecode.com/svn/trunk@4188 2bbb7eff-a529-9590-31e7-b0007b416f81
Diffstat (limited to 'bench/MathBench.cpp')
-rw-r--r-- | bench/MathBench.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/bench/MathBench.cpp b/bench/MathBench.cpp index 0e35940bfa..21c113c0ca 100644 --- a/bench/MathBench.cpp +++ b/bench/MathBench.cpp @@ -138,7 +138,7 @@ static inline uint32_t QMul64(uint32_t value, U8CPU alpha) { uint64_t tmp = value; tmp = (tmp & mask) | ((tmp & ~mask) << 24); tmp *= alpha; - return ((tmp >> 8) & mask) | ((tmp >> 32) & ~mask); + return (uint32_t) (((tmp >> 8) & mask) | ((tmp >> 32) & ~mask)); } class QMul64Bench : public MathBenchU32 { @@ -284,6 +284,9 @@ protected: for (int j = 0; j < NN; ++j) { for (int i = 0; i < N - 4; ++i) { const SkRect* r = reinterpret_cast<const SkRect*>(&data[i]); + if (false) { // avoid bit rot, suppress warning + isFinite(*r); + } counter += r->isFinite(); } } @@ -336,7 +339,6 @@ protected: SkRandom rand; float accum = 0; const float* data = fData; - float tmp[ARRAY] = {}; if (fFast) { for (int j = 0; j < LOOP; ++j) { |