Commit 45339b04 authored by Lucian Grijincu's avatar Lucian Grijincu Committed by Noam Lerner

folly: -Wsign-compare

Test Plan: runtests

Reviewed By: philipp@fb.com

Subscribers: folly-diffs@, jsedgwick, yfeldblum, tudort, chalfant

FB internal diff: D2114063

Signature: t1:2114063:1433111051:6686508d78de39ea4ea5dc283189c472e23f8f42
parent 8ec98dd8
......@@ -486,7 +486,7 @@ static void runContendedReaders(size_t numOps,
vector<thread> threads(numThreads);
BENCHMARK_SUSPEND {
for (int t = 0; t < numThreads; ++t) {
for (size_t t = 0; t < numThreads; ++t) {
threads[t] = DSched::thread([&, t, numThreads] {
Lock privateLock;
Lock* lock = useSeparateLocks ? &privateLock : &globalLock;
......@@ -583,7 +583,7 @@ static void runMixed(size_t numOps,
vector<thread> threads(numThreads);
BENCHMARK_SUSPEND {
for (int t = 0; t < numThreads; ++t) {
for (size_t t = 0; t < numThreads; ++t) {
threads[t] = DSched::thread([&, t, numThreads] {
struct drand48_data buffer;
srand48_r(t, &buffer);
......@@ -712,7 +712,7 @@ static void runAllAndValidate(size_t numOps, size_t numThreads) {
vector<thread> threads(numThreads);
BENCHMARK_SUSPEND {
for (int t = 0; t < numThreads; ++t) {
for (size_t t = 0; t < numThreads; ++t) {
threads[t] = DSched::thread([&, t, numThreads] {
struct drand48_data buffer;
srand48_r(t, &buffer);
......@@ -1098,7 +1098,7 @@ static void runRemoteUnlock(size_t numOps,
vector<thread> threads(numSendingThreads + numReceivingThreads);
BENCHMARK_SUSPEND {
for (int t = 0; t < threads.size(); ++t) {
for (size_t t = 0; t < threads.size(); ++t) {
threads[t] = DSched::thread([&, t, numSendingThreads] {
if (t >= numSendingThreads) {
// we're a receiver
......@@ -1246,7 +1246,7 @@ static void runPingPong(size_t numRounds, size_t burnCount) {
while (!goPtr->load()) {
this_thread::yield();
}
for (int i = 0; i < numRounds; ++i) {
for (size_t i = 0; i < numRounds; ++i) {
locks[i % 3].first.unlock();
locks[(i + 2) % 3].first.lock();
burn(burnCount);
......@@ -1257,7 +1257,7 @@ static void runPingPong(size_t numRounds, size_t burnCount) {
while (!goPtr->load()) {
this_thread::yield();
}
for (int i = 0; i < numRounds; ++i) {
for (size_t i = 0; i < numRounds; ++i) {
locks[i % 3].first.lock_shared();
burn(burnCount);
locks[(i + 2) % 3].first.unlock_shared();
......
......@@ -688,7 +688,7 @@ collectN(InputIterator first, InputIterator last, size_t n) {
};
auto ctx = std::make_shared<CollectNContext>();
if (std::distance(first, last) < n) {
if (size_t(std::distance(first, last)) < n) {
ctx->p.setException(std::runtime_error("Not enough futures"));
} else {
// for each completed Future, increase count and add to vector, until we
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment