From 0072ef50bfa5574ad4d084968b8fbbb0380549c6 Mon Sep 17 00:00:00 2001 From: liaogang Date: Wed, 28 Sep 2016 18:00:39 +0800 Subject: [PATCH] Fix compile check type failed in linux --- paddle/gserver/tests/test_PyDataProvider2.cpp | 2 +- paddle/utils/tests/test_ThreadBarrier.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/paddle/gserver/tests/test_PyDataProvider2.cpp b/paddle/gserver/tests/test_PyDataProvider2.cpp index c5fe31b2918..e75e53ab7f4 100644 --- a/paddle/gserver/tests/test_PyDataProvider2.cpp +++ b/paddle/gserver/tests/test_PyDataProvider2.cpp @@ -321,7 +321,7 @@ TEST(PyDataProvider2, input_order) { if (!realBatchSize) { break; } - ASSERT_EQ(batch.getStreams().size(), 2); + ASSERT_EQ(batch.getStreams().size(), (size_t)2); for (size_t i = 0; i < realBatchSize; ++i) { ASSERT_EQ(batch.getStream(0).ids->getData()[i], 0); ASSERT_EQ(batch.getStream(1).ids->getData()[i], 1); diff --git a/paddle/utils/tests/test_ThreadBarrier.cpp b/paddle/utils/tests/test_ThreadBarrier.cpp index 241cdda7bd1..90bd6c21bc8 100644 --- a/paddle/utils/tests/test_ThreadBarrier.cpp +++ b/paddle/utils/tests/test_ThreadBarrier.cpp @@ -32,7 +32,7 @@ void testNormalImpl(size_t thread_num, std::vector threads; threads.reserve(thread_num); - for (int32_t i = 0; i < thread_num; ++i) { + for (size_t i = 0; i < thread_num; ++i) { threads.emplace_back([&thread_num, &mutex, &tids, &barrier, &callback]{ callback(thread_num, mutex, tids, barrier); -- GitLab