Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(146)

Unified Diff: tests/PackBitsTest.cpp

Issue 800993002: Even more win64 warning fixes (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: more Created 6 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « tests/ImageCacheTest.cpp ('k') | tests/PathTest.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tests/PackBitsTest.cpp
diff --git a/tests/PackBitsTest.cpp b/tests/PackBitsTest.cpp
index 2af4f1867daf49d40c54ea7a0e8a72354dab0f77..ce4e8be467ce065db0ed5363af507c269c5f41af 100644
--- a/tests/PackBitsTest.cpp
+++ b/tests/PackBitsTest.cpp
@@ -43,7 +43,7 @@ static void test_pack16(skiatest::Reporter* reporter) {
}
for (int n = 1000; n; n--) {
- size_t size = 50;
+ int size = 50;
uint16_t src[100], src2[100];
uint8_t dst[200];
rand_fill(src, size);
@@ -52,7 +52,7 @@ static void test_pack16(skiatest::Reporter* reporter) {
size_t maxSize = SkPackBits::ComputeMaxSize16(size);
REPORTER_ASSERT(reporter, maxSize >= dstSize);
- size_t srcCount = SkPackBits::Unpack16(dst, dstSize, src2);
+ int 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);
@@ -96,7 +96,7 @@ static void test_pack8(skiatest::Reporter* reporter) {
REPORTER_ASSERT(reporter, match);
}
- for (size_t size = 1; size <= 512; size += 1) {
+ for (uint32_t size = 1; size <= 512; size += 1) {
for (int n = 100; n; n--) {
uint8_t src[600], src2[600];
uint8_t dst[600];
@@ -112,8 +112,8 @@ static void test_pack8(skiatest::Reporter* reporter) {
REPORTER_ASSERT(reporter, match);
for (int j = 0; j < 100; j++) {
- size_t skip = gRand.nextU() % size;
- size_t write = gRand.nextU() % size;
+ uint32_t skip = gRand.nextU() % size;
+ uint32_t write = gRand.nextU() % size;
if (skip + write > size) {
write = size - skip;
}
« no previous file with comments | « tests/ImageCacheTest.cpp ('k') | tests/PathTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698