diff options
author | reed@android.com <reed@android.com@2bbb7eff-a529-9590-31e7-b0007b416f81> | 2009-03-20 04:59:37 +0000 |
---|---|---|
committer | reed@android.com <reed@android.com@2bbb7eff-a529-9590-31e7-b0007b416f81> | 2009-03-20 04:59:37 +0000 |
commit | 04225dcdec5a01bc9889b7fb03e7aceb87fccc6e (patch) | |
tree | 48d7298be4647a1620e7b2ef722d725ba6ce88ab /tests | |
parent | 49f0ff25a046d6001dc2d095b6fa3c30f0f46b6a (diff) |
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
Diffstat (limited to 'tests')
-rw-r--r-- | tests/MathTest.cpp | 5 | ||||
-rw-r--r-- | tests/PackBitsTest.cpp | 4 | ||||
-rw-r--r-- | tests/TriangulationTest.cpp | 6 |
3 files changed, 5 insertions, 10 deletions
diff --git a/tests/MathTest.cpp b/tests/MathTest.cpp index 50d59cfd19..38c3dc1319 100644 --- a/tests/MathTest.cpp +++ b/tests/MathTest.cpp @@ -176,11 +176,6 @@ static void TestMath(skiatest::Reporter* reporter) { 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 fc11fb26a9..22de3c3b1d 100644 --- a/tests/PackBitsTest.cpp +++ b/tests/PackBitsTest.cpp @@ -45,7 +45,7 @@ static void test_pack16(skiatest::Reporter* reporter) { 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 @@ static void test_pack8(skiatest::Reporter* reporter) { 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 869e739859..9d47181876 100644 --- a/tests/TriangulationTest.cpp +++ b/tests/TriangulationTest.cpp @@ -36,7 +36,7 @@ static void PrintTriangles(const SkTDArray<SkPoint> &triangles, } -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 @@ static bool CompareTriangleList(size_t numTriangles, 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; |