build with -Wall
fix associated warnings (at least on gcc 4.0.1)
git-svn-id: http://skia.googlecode.com/svn/trunk@129 2bbb7eff-a529-9590-31e7-b0007b416f81
diff --git a/tests/MathTest.cpp b/tests/MathTest.cpp
index 50d59cf..38c3dc1 100644
--- a/tests/MathTest.cpp
+++ b/tests/MathTest.cpp
@@ -176,11 +176,6 @@
int32_t x;
SkRandom rand;
- // these should not assert
- SkToS8(127); SkToS8(-128); SkToU8(255);
- SkToS16(32767); SkToS16(-32768); SkToU16(65535);
- SkToS32(2*1024*1024); SkToS32(-2*1024*1024); SkToU32(4*1024*1024);
-
// these should assert
#if 0
SkToS8(128);
diff --git a/tests/PackBitsTest.cpp b/tests/PackBitsTest.cpp
index fc11fb2..22de3c3 100644
--- a/tests/PackBitsTest.cpp
+++ b/tests/PackBitsTest.cpp
@@ -45,7 +45,7 @@
size_t maxSize = SkPackBits::ComputeMaxSize16(size);
REPORTER_ASSERT(reporter, maxSize >= dstSize);
- int srcCount = SkPackBits::Unpack16(dst, dstSize, src2);
+ size_t srcCount = SkPackBits::Unpack16(dst, dstSize, src2);
REPORTER_ASSERT(reporter, size == srcCount);
bool match = memcmp(src, src2, size * sizeof(uint16_t)) == 0;
REPORTER_ASSERT(reporter, match);
@@ -99,7 +99,7 @@
size_t maxSize = SkPackBits::ComputeMaxSize8(size);
REPORTER_ASSERT(reporter, maxSize >= dstSize);
- int srcCount = SkPackBits::Unpack8(dst, dstSize, src2);
+ size_t srcCount = SkPackBits::Unpack8(dst, dstSize, src2);
REPORTER_ASSERT(reporter, size == srcCount);
bool match = memcmp(src, src2, size * sizeof(uint8_t)) == 0;
REPORTER_ASSERT(reporter, match);
diff --git a/tests/TriangulationTest.cpp b/tests/TriangulationTest.cpp
index 869e739..9d47181 100644
--- a/tests/TriangulationTest.cpp
+++ b/tests/TriangulationTest.cpp
@@ -36,7 +36,7 @@
}
-static bool CompareTriangleList(size_t numTriangles,
+static bool CompareTriangleList(int numTriangles,
const float refTriangles[][3][2],
const SkTDArray<SkPoint> &triangles) {
if (triangles.count() != numTriangles * 3) {
@@ -44,8 +44,8 @@
numTriangles, triangles.count() / 3);
return false;
}
- size_t numErrors = 0;
- for (size_t i = 0; i < numTriangles; ++i) {
+ int numErrors = 0;
+ for (int i = 0; i < numTriangles; ++i) {
const float *r = &refTriangles[i][0][0];
const SkScalar *t = &triangles[i * 3].fX;
bool equalTriangle = true;