aboutsummaryrefslogtreecommitdiffhomepage
path: root/tests/MathTest.cpp
diff options
context:
space:
mode:
authorGravatar bsalomon@google.com <bsalomon@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81>2012-09-26 13:08:56 +0000
committerGravatar bsalomon@google.com <bsalomon@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81>2012-09-26 13:08:56 +0000
commit373ebc634573364c27b1ebd35bb537ef1285cba4 (patch)
treede677b3d81e81875c85dee3c838959425057a9f7 /tests/MathTest.cpp
parent5c83dcc371b68e4cda2d533e247684ea1a32d1bc (diff)
Suppress some warnings on linux.
R=reed@google.com Review URL: https://codereview.appspot.com/6572046 git-svn-id: http://skia.googlecode.com/svn/trunk@5687 2bbb7eff-a529-9590-31e7-b0007b416f81
Diffstat (limited to 'tests/MathTest.cpp')
-rw-r--r--tests/MathTest.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/tests/MathTest.cpp b/tests/MathTest.cpp
index 086b7373a8..c0babeecea 100644
--- a/tests/MathTest.cpp
+++ b/tests/MathTest.cpp
@@ -184,14 +184,14 @@ static float nextFloat(SkRandom& rand) {
*/
static bool equal_float_native_skia(float x, uint32_t ni, uint32_t si) {
if (!(x == x)) { // NAN
- return si == SK_MaxS32 || si == SK_MinS32;
+ return ((int32_t)si) == SK_MaxS32 || ((int32_t)si) == SK_MinS32;
}
// for out of range, C is undefined, but skia always should return NaN32
if (x > SK_MaxS32) {
- return si == SK_MaxS32;
+ return ((int32_t)si) == SK_MaxS32;
}
if (x < -SK_MaxS32) {
- return si == SK_MinS32;
+ return ((int32_t)si) == SK_MinS32;
}
return si == ni;
}